>SCAN >lcTable = DataDict.TableName >select DataDict > >lcFields = "INSERT INTO "+lcTable+" (" >lcValues = "Values(" >lcComma = '' >* seems to me that this should be scan for > scan while TableName = m.lcTable > lcFields = lcFields + lcComma + CRLF + alltrim(FieldName) > lcValues = lcValues + lcComma + CRLF + '?poRow.' + alltrim(FieldName) > lcComma = ', ' > ENDSCAN > lcInser = lcFields + ') '+CRLF + lcValues +')' > PRIVATE poRow > * shouldn't there be a select data tabel here? > SCAN FOR tablename = m.lcTable && not sure what condition this should be > SCATTER NAME poRow > sqlexec(hCon, m.lcInser) > ENDSCAN > endtext > lcTable = DataDict.tableName >endscan >>
>>> lcTable = DataDict.TableName >>> >>>select DataDict >>> >>> scan while TableName = m.lcTable >>> lcFields = lcFields + IIF(empty(m.lcFields,'') + ', ' + CRLF + alltrim(FieldName) >>> lcValues = lcValues + IIF(empty(m.lcValues,'') + ', ' + CRLF + '?' + m.lcTable + '. ' + alltrim(FieldName) >>> endscan >>> text to lcPRG additive textmerge noshow >>> text to lcInsert noshow >>> INSERT INTO <<m.lcTable>> ( >>> <<m.lcFields>> >>> ) >>> VALUES ( >>> <<m.lcValues>> >>> ) >>> endtext >>> SCAN <<m.lcTable>> >>> >>> sqlexec(hCon, m.lcInser) >>> ENDSCAN >>> endtext >>> lcTable = DataDict.tableName >>>endscan>>>