Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert command
Message
 
À
10/09/2007 15:36:13
Issam Mansour
Jordan Business Machines
Amman, Jordanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01253530
Message ID:
01253531
Vues:
17
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform