Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Save records
Message
 
To
20/08/2009 02:14:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01419173
Message ID:
01419176
Views:
64
>Hi all, I make a temporary database when making an invoice which stores invoice details like product number, desc, price, qty and total etc. At the end of the invoice, I add this database records to a permanent database which I call it invhist.dbf. For some reason, one out of every 100 odd invoice lines are not saved to invhist.dbf. My code is :
>
>sele invtemp  && temporary database
>go top
>do while not eof()
>  scatter to x1
>  sele invhist
>  append blank
>  gather from x1
>  sele invtemp
>  skip
>enddo 
>
>
>Is there a better way to do this ???? TIA
>Shafid

If invtemp is cursor:
SELECT invhist
APPEND FROM (DBF("invtemp"))
Not sure if the following syntax is avalable in VFP8:
INSERT INTO invhist;
SELECT * FROM invtemp
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform