I'm not very good at the programming aspect of my job. Can someone look at this code and tell me where I'm screwing up?
I think I'm screwing up at tmp[blahblahblah] = result(1);
I know the field i'm grabbing from is a text field..
var dbConn = DatabaseConnectionFactory.createDatabaseConnection('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:sqlserver://10.0.0.55:1433/raypax','username','password');
var AccNum = msg['tag00080050']['@tag'].toString();
var expression = "SELECT REPORT_TEXT FROM PACS_T_REPORT_TEXT WHERE EXAM_KEY = '" + AccNum + "';";
var result = dbConn.executeCachedQuery(expression);
//go to the first result
//get the value from the first colum as an integer
tmp['OBX']['OBX.5']['OBX.5.1'] = result(1);