>>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) + ")" >>
TEXT TO m.cFileStr ADDITIVE TEXTMERGE NOSHOW FLAGS 2 SELECT <<cTableName>> cSqlInsert = "<<cSqlInsert>>" DO WHIE !eof() nResult = SQLEXEC(hCon, cSqlInsert) SKIP ENDDO ENDTEXTI suppose the above
cSqlInsert = "<<cSqlInsert>>"
converts the variable cSqlInsert into a long literal. Is this correct?