Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Most effective way to insert many recs to SQL Server?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00127997
Message ID:
00128361
Vues:
43
Try this. SQL Pass through

nc=SQLCONNECT("Sales","sa","")
select sales
Go Top
Scan
cSQL = "Insert INTO SALES (STORE,REGISTER,journal,cbarcode,nprice,ncost,nqty, "
+;
"nnetprice,ngrossprice,date ) " + ;
"Values ("+;
allt(str(laDB[x,2]))+ ", " + ;
allt(str(sales.register))+ ", " + ;
allt(str(Sales.Journal))+ ", " + ;
"'" + allt(sales.cbarcode) + "', " + ;
allt(str(Sales.nPrice))+ ", " + ;
allt(str(Sales.ncost))+ ", " + ;
allt(str(Sales.nqty))+ ", " + ;
allt(str(Sales.nNetPrice))+ ", " + ;
allt(str(Sales.nGrossPrice))+ ", '" + ttoc(dtot(sales.date)) +"' )"
nerror =SQLExec(nc,cSQL)
EndScan
Fred Besterwitch, MCP

The harder you work. The luckier you get.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform