Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Tore Bleken
  Where is Tore Bleken?
 Stokke
 Norway
 Tore Bleken
 To: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 Tags
Subject: RE: Text File to DBF
Thread ID: 394056 Message ID: 394071 # Views: 39 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Monday, December 30, 2013 1:35:57 PM         
   


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

>
> Save the file as UTF8 and remove the byte order mark at the start of the file (or leave it as you wouldn't get the first line anyway) and you should be fine. ie:
>
>
StrToFile( Strconv( FileToStr( "attend.txt" ), 10 ), "attend.txt" )
> 
> 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 for IsDigit(no)
> brow
> 
> 

>
>
> PS: BTW removing chr(0)'s from a file is not the way of converting a Unicode file to UTF8. Some characters are made up of more than 2 characters. Just FYI.
>
>

> Cetin Basoz
>
> Give some sample data in code for your question - here is the tool you need to generate the code
>
> My Blog
>

> MongoDb Certified Developer
> MongoDb Certified DBA
>

> Support Wikipedia

Thanks for the update. I confess that I rarely work with Unicode files, so I completely forgot about strconv().

There's a fine line between helping and adding to the confusion.

How to create sample data

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