>Hi,
>
>I have the following insert command for records more than (900000) each time it issues. The command works correct but some time I have a (sql command error). Both file are totally identical.
>
>Local L_SQLCMD
>TEXT TO L_SQLCMD TEXTMERGE PRETEXT 1
>INSERT INTO yearly
> (year, acctno, vno, vtype, tdate, vdesc, damt, camt, cdamt, ccamt, batchno, batdate, username, cur_code, ex_rate, av_rate, post, unpost, tfound, descode, transtype, currdiff, Ttype)
>SELECT year, acctno, vno, vtype, tdate, vdesc, damt, camt, cdamt, ccamt, batchno, batdate, username, cur_cod, ex_rate, av_rate, 1, unpost, tfound, descode, transtype, currdiff, ttype
>FROM transact
>WHERE (batchno = <
>) AND (year = <>)
>ENDTEXT
>
>If SQLExec(K_NCONNECTHANDLE,L_SQLCMD,[TmpData],aRecRow) >0
> Messagebox(aRecRow(1,2),0+64,aRecRow(1,1))
>ELSE
> Messagebox("Error in SQL Command")
>endif
Always use AERROR() to see what the error is!If SQLExec(K_NCONNECTHANDLE,L_SQLCMD,[TmpData],aRecRow) >0
Messagebox(aRecRow(1,2),0+64,aRecRow(1,1))
ELSE
AERROR(laError)
Messagebox("Error in SQL Command. Reason: "+laError[2])
endif
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.