>>>>cSqlInsert = "insert into Mytable (fld1, fld2, fld3) values (?MyTable.fld1, ?MyTable.fld2, ?MyTable.fld3)"
>>>>
>>>>>>>TEXT TO cSqlInsert NOSHOW PRETEXT 15 >>> insert into Mytable >>> (fld1, fld2, fld3) >>> values >>> (?MyTable.fld1, ?MyTable.fld2, ?MyTable.fld3) >>>ENDTEXT >>> >>>>>>BTW that way is more readable :-)
cSqlInsert = "insert into Mytable (fld1, fld2, fld3) values (?MyTable.fld1, ?MyTable.fld2, ?MyTable.fld3)"
is very very long. Imagine that you have 30 fields. And this expression is created in a data driven approach scanning fields of the dictionary. Here is a segment of this code:cSqlInsert = "insert into " + ALLTRIM(DICT.TBL_NAME) + " " cSqlInsertValues = "" DO WHILE !EOF() AND DICT.TBL_NAME = cTableName cSqlInsert = cSqlInsert + IIF( EMPTY(cSqlInsertValues),"( ",", ") + ALLTRIM(DICT.FLD_NAME) cSqlInsertValues = cSqlInsertValues + IIF( EMPTY(cSqlInsertValues),"( ",", ") + "?" + ALLTRIM(DICT.TBL_NAME) + "." + ALLTRIM(DICT.FLD_NAME) SKIP IN DICT ENDDO cSqlInsert = cSqlInsert + ") VALUES " + cSqlInsertValues + ")"So the above code creates this long cSqlInsert. Any suggestions on what to change?