lcMyVar = strtran(lcMyVar,"'","''")>Thanks, I normally use that technique, but in this case some of the fields may contain single quotes within themselves and I can't strip them out because another application that uses this data relies on them. Also, some of the fields are memos and could be quite long.
>>cSql = "Insert into table(field1, fields2) values (" >>cSql = cSql + "'" + oRec.Field1 + "', " && Field 1 contains a string, needs single quotes >>cSql = cSql + STR(oRec.Field2,5,0) + ")" && Field 2 contains a number, but we are creating a string here >>SQLEXEC(iCH,cSql) >>