Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Ahsan Rana
  Where is Ahsan Rana?
 Lahore
 Pakistan
 Ahsan Rana
 Tags
Subject: RE: Text File to DBF
Thread ID: 394056 Message ID: 394061 # Views: 52 # Ratings: 2
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Monday, December 30, 2013 10:48:36 AM         
   


> >
> >
> >
> >
APPEND FROM your.txt TYPE DELIMITED WITH TAB

> >
> >
> >
> > hth
> > -Stefan
>
> Thanks Stefan for reply. I am using the following code to append data from text file but it does not append data and dbf is empty
>
>
> CREATE CURSOR dAttend (No c(10),TmNo c(10),EnNo c(10),Name c(50),GmNo c(10),Mode c(10),DateTime c(50))
> APPEND FROM Attend.txt TYPE DELIMITED WITH TAB
> 




The following runnable-sample.PRG works as expected for me, same for you?

LOCAL lcContent
TEXT TO lcContent NOSHOW
No	TMNo	EnNo	Name	GMNo	Mode	DateTime
0	5	84		5	46	2013-06-22 10:35:19
1	5	620		5	30	2013-06-22 10:35:43
2	5	1911		5	30	2013-06-22 10:36:03
3	5	211		5	30	2013-06-22 10:36:08
4	5	195		5	30	2013-06-22 10:36:16
5	5	84		5	47	2013-06-22 19:20:55
6	5	211		5	47	2013-06-22 19:21:08
7	5	620		5	30	2013-06-23 07:55:55
8	5	195		5	30	2013-06-23 09:38:27
9	5	84		5	30	2013-06-23 10:19:12
10	5	211		5	30	2013-06-23 10:19:18
ENDTEXT

LOCAL lcFile
lcFile = ADDBS(GETENV("TEMP")) + "test55.txt"
STRTOFILE(m.lcContent, m.lcFile)

CREATE CURSOR dAttend (No c(10),TmNo c(10),EnNo c(10),Name c(50),GmNo c(10),Mode c(10),DateTime c(50))
APPEND FROM (m.lcFile) TYPE DELIMITED WITH TAB
BROWSE

ERASE (m.lcFile)




hth
-Stefan

ENTIRE THREAD

Text File to DBF Posted by Ahsan Rana @ 12/30/2013 9:32:42 AM
RE: Text File to DBF Posted by Tore Bleken @ 12/30/2013 9:42:58 AM
RE: Text File to DBF Posted by Stefan Wuebbe @ 12/30/2013 9:49:35 AM
RE: Text File to DBF Posted by Ahsan Rana @ 12/30/2013 10:26:52 AM
RE: Text File to DBF Posted by Stefan Wuebbe @ 12/30/2013 10:48:36 AM
RE: Text File to DBF Posted by Ahsan Rana @ 12/30/2013 11:18:55 AM
RE: Text File to DBF Posted by Tore Bleken @ 12/30/2013 11:12:01 AM
RE: Text File to DBF Posted by Ahsan Rana @ 12/30/2013 11:27:29 AM
RE: Text File to DBF Posted by Tore Bleken @ 12/30/2013 11:32:27 AM
RE: Text File to DBF Posted by michael johnson @ 12/30/2013 11:31:53 AM
RE: Text File to DBF Posted by Cetin Basoz @ 12/30/2013 12:23:48 PM
RE: Text File to DBF Posted by Tore Bleken @ 12/30/2013 1:35:57 PM
RE: Text File to DBF Posted by Cetin Basoz @ 12/30/2013 6:58:53 PM