Informix single quote Unterminated string constant error
Posted in 2004
Hello Everyone, I am running Informix 7.31, CSDK 2.81.TC3, (IIS 5.0, IE6) and I am trying to assign the value of a Recordset field to an array element with this code... aRs_PSPA[cnt][3] = oRs2.Fields("spa_desc").Value; ...but I get an "Unterminated string constant" error? The error only occurs when there is a single quote (') in the Recordset value: eg. when spa_desc = "NATE'S EPB 1", I get the error, but when spa_desc = "NATES EPB 1", I do NOT get the error. I only get the error when I assign the Recordset value to an array variable, so this code works correctly... var test = oRs2.Fields("spa_desc"); Is there a bug in the Informix OLE DB SDK? Do I need to use a JavaScript function to double-up on single quotes (as I do in INSERT statements)? Thanks In Advance, Nate