.. VALUES ( " + TransForm(BatchSkey) + ","; + "'" + CoCode + "',"; + Transform(UsrBatchId) + "," &&.. etc.Note that for numeric values you have to Transform() to character and for string and date values you have to enclose it within single quotes. The final result should look like:
.. VALUES(1, '001', 3, '2001-10-31')It might help debugging this if you first construct the statement in a variable and then give it to SqlExec() like so: SqlExec(nHan, lcStatement).