> >insertSImain = "Insert Into webprddt7.qasimast(recseq, insptype, docno, partno," +; > " shipsetid, dwgrev, vendorcode, faiindex, lotqty, sampletype, sampleqty, accptdqty," +; > " rejdqty, inspdate, inspector, inspsource, rejtindex)" +; > " Values(" + ALLTRIM(STR(x)) +; > ",1,'" + ALLTRIM(testconnQuery.docno) +; > "','" + ALLTRIM(testconnQuery.partno) +; > "','" + ALLTRIM(testconnQuery.jobno) +; > "','" + ALLTRIM(testconnQuery.revision) +; > "','" + ALLTRIM(testconnQuery.vendorcode) +; > "'," + ALLTRIM(STR(testconnQuery.faiindex)) +; > "," + ALLTRIM(STR(testconnQuery.lotsize)) +; > "," + ALLTRIM(STR(testconnQuery.sampletype)) +; > "," + ALLTRIM(STR(testconnQuery.cmss)) +; > "," + ALLTRIM(STR(testconnQuery.cmaa)) +; > "," + ALLTRIM(STR(testconnQuery.cmar)) +; > "," + TTOC(testconnQuery.inspectdt) +; > ",'" + ALLTRIM(testconnQuery.inspectsna) +; > "',1," + ALLTRIM(STR(y)) + ")" > > ? insertSImain > > If SQLEXEC(testconn, insertSImain) <> -1 Then > =SQLCOMMIT(testconn) > ELSE > If Aerror(odbcerrormsg) > 0 Then > MessageBox(odbcerrormsg(2)) > EndIf > EndIF > > >How about:
TEXT TO insertSImain NOSHOW PRETEXT 15 TEXTMERGE Insert Into webprddt7.qasimast(recseq, insptype, docno, partno, shipsetid, dwgrev, vendorcode, faiindex, lotqty, sampletype, sampleqty, accptdqty, rejdqty, inspdate, inspector, inspsource, rejtindex) VALUES (?x,1, ?ALLTRIM(testconnQuery.docno), ?ALLTRIM(testconnQuery.partno), ?ALLTRIM(testconnQuery.jobno), ?ALLTRIM(testconnQuery.revision), ?ALLTRIM(testconnQuery.vendorcode), ?testconnQuery.faiindex, ?testconnQuery.lotsize, ?testconnQuery.sampletype, ?testconnQuery.cmss, ?testconnQuery.cmaa, ?testconnQuery.cmar, ?testconnQuery.inspectdt, ?ALLTRIM(testconnQuery.inspectsna),1, ? y) ENDTEXT ? insertSImain If SQLEXEC(testconn, insertSImain) <> -1 Then =SQLCOMMIT(testconn) ELSE If Aerror(odbcerrormsg) > 0 Then MessageBox(odbcerrormsg(2)) EndIf EndIF