web stats
Mirth Community - View Single Post - How to pass ' character to SQL
View Single Post
  #4  
Old 02-27-2012, 10:17 AM
donsls donsls is offline
OBX.2 Kenobi
 
Join Date: Feb 2010
Posts: 72
donsls is on a distinguished road
Default

I tried this method, but it's not working. Not sure what the problem is. Following is the code that I use.

msg = msg.toString().replace(/\' /g, "'");
var ack_message = SerializerFactory.getHL7Serializer(false, false).fromXML(msg);
var strSQL = " Insert into tblHL7 (ID_T, msg1) values('" + sidforhl7msg + "', '" + ack_message + "')";

var result = dbConnOracle.executeCachedQuery(strSQL);
dbConnOracle.close();
Reply With Quote