Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import data from text file
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01242133
Message ID:
01242141
Views:
21
>i've named like INV_0010707190003.001 file(s) which is created from CASIO HAND HELD terminal ,it has data from contains invoice header and invoice details
>
>txt file(s) contains like below ( delimited with ',' )
>
>01,0010707190003,0,0,0,39300,MERKEZ MAGAZA,,E-146,2 NOLU F TIPI,1,01,MERKEZ DEPO,19/07/2007,99,1,,19/07/2007,17:38:15
>02,18607,8691638031737,3,AD,SIEMENS 3P 50A C OTOMAT,1,12.2
>02,18608,3245066061726,12,AD,LEGRANT B 16 A W OTOMAT,1,17.56
>
>
>at the txt file
>begin with 01 lines means invoice header
>begin with 02 lines means invoice details
>
>so what i want to do ;
>
>i am planning to do
>
>i'll create one of form that user can select .txt file(s) which has .001 extension and
>in a loop will import invoice header and invoice detail lines from .txt file to the cursor and
>will insert data to the invoice header table and invoice detail table
>and then move the selected .txt file(s) to the another folder or rename .txt file(s) eg. TRF or XXX or whatever extension.
>by this way at another time prevent to view transferable file(s) list when user run the form.
>
>how would be your advices about this issue ?
>
>
>so first job for me;
>i should insert 01 lines to the invoice header table and 02 lines to the invoice detail table
>and also i should insert parent key value ( which is created GUID() ) invoice detail table
>
>
>approx. my need is so , hope that i can explained :)
>
>any suggestions or code samples would be very appreciated.

Hi Soykan,
very long time not saw you.
I have one question:
Is this a one text file:
01,0010707190003,0,0,0,39300,MERKEZ MAGAZA,,E-146,2 NOLU F TIPI,1,01,MERKEZ DEPO,19/07/2007,99,1,,19/07/2007,17:38:15
02,18607,8691638031737,3,AD,SIEMENS 3P 50A C OTOMAT,1,12.2
02,18608,3245066061726,12,AD,LEGRANT B 16 A W OTOMAT,1,17.56
or they are two:
**** xxxx.001
01,0010707190003,0,0,0,39300,MERKEZ MAGAZA,,E-146,2 NOLU F TIPI,1,01,MERKEZ DEPO,19/07/2007,99,1,,19/07/2007,17:38:15


**** xxxx.002
02,18607,8691638031737,3,AD,SIEMENS 3P 50A C OTOMAT,1,12.2
02,18608,3245066061726,12,AD,LEGRANT B 16 A W OTOMAT,1,17.56
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