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.