Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating SQL with fox tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00151251
Message ID:
00151337
Vues:
19
Hi Gray,

I do a similar thing. See Sample Below. Try It Out..


nc=SQLCONNECT('backend',"sa","")
set date ameri

** Sales File
select 0
If Used("Sales")
USE IN SALES
ENDIF
Select 0
Use Sales
Go Top
Scan
wait wind Nowait Allt(str(x))+" - "+Allt(str(recno()))
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)
if nerror < 0
aerror(f)
disp memo like f
? " error"
Suspend
Endif
EndScan

close all
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