Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Got a result of: org.mozilla.javascript.Undefined

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Got a result of: org.mozilla.javascript.Undefined

    Hi Im trying to implement DataBase Reader/Writer. I used JavaScript and Store procedure. Im getting the following error in the Server Log.

    [2008-05-26 17:19:24,691] ERROR (com.webreach.mirth.connectors.jdbc.JdbcMessageRec eiver:240): Got a result of: [email protected]

    Here is my script

    DataBase reader Source:

    Code:
    var dbConn = DatabaseConnectionFactory.createDatabaseConnection('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:«»sqlserver://xxx.xxx.xx.xxx/LocalDB','sa','xxxxx');
    var result = dbConn.executeCachedQuery("Exec usp_Temp_S"«»);
    result.next(); 
    globalMap.put('Results', result.getInt(1));
    result.close();
    dbConn.close();
    Im getting an ID from the database and maping it to global variable Results.

    Im using this variable and inserting into another table in the same db.

    DataBase writer Destination:
    Code:
    var dbConn = DatabaseConnectionFactory.createDatabaseConnection('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:«»sqlserver://xxx.xxx.xx.xxx/LocalDB','sa','xxxxx');
    var result = dbConn.executeUpdate('Insert into tmpdev(TempVisitID) values(' + globalMap.get('Results') + ')');
    result.close();
    dbConn.close();
    I don't understand whats wrong with this code?
Working...
X