>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 + ")" >>
cSqlInsert = "insert into " + ALLTRIM(DICT.TBL_NAME) + "(" cSqlInsertValues = "" SCAN WHILE DICT.TBL_NAME = cTableName cSqlInsert = cSqlInsert + ALLTRIM(DICT.FLD_NAME) + ", " cSqlInsertValues = cSqlInsertValues + "?" + ALLTRIM(DICT.TBL_NAME) + "." + ALLTRIM(DICT.FLD_NAME) +", " ENDSCAN cSqlInsert = LEFT(cSqlInsert, LEN(cSqlInsert)-2)+ ") VALUES (" + LEFT(cSqlInsertValues, LEN(cSqlInsertValues)-2) + ")"If you have problems, please write the cSqlInsert into text file and attach it here :-)