web stats
Mirth Community - View Single Post - Transformation using Database
View Single Post
  #8  
Old 06-25-2019, 12:32 PM
cory_cole cory_cole is offline
Mirth Guru
 
Join Date: Mar 2012
Posts: 1,238
cory_cole is on a distinguished road
Default

You will need to fill in the information specific to your server....

var dbConn;

try {
dbConn = DatabaseConnectionFactory.createDatabaseConnection ('org.postgresql.Driver',IP Address, username, password);

var query = 'SELECT FIELD1 FROM TABLE WHERE FIELD2 = msg....
result = dbConn.executeCashedQuery(query);
while(result.next())
{
var newCode = result.getString(1);
}
} finally {
if (dbConn) {
dbConn.close();
}
}
Reply With Quote