Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different results using import wizard and command - Why? 1

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
GB

If this is not the right forum, please let me know.

I created a table using a txt file with the VFP9 import wizard. The data format was delimited with a field delimiter ,

When you browse the table its perfect with all the columns from the txt file sorted in fields within the table.

I then used that table I created from the wizard to import the same txt file as shown below.

However, when you use the following command to automate the process in a prg, some of the data from the columns in the txt file end up in the wrong fields in the table.

Code:
APPEND FROM myfile.txt DELIMITED WITH ,

My question is then... Why does this happen when the wizard works and the command line doesn't?

Thank you

Lee
 
DELIMITED WITH , would mean that each field is surrounded by a , with some other character separating the fields.

You want this instead, I think:

DELIMITED WITH CHARACTER ,

which means there's a , between each field.

This is all clear as mud in the help file, but just remember there's a difference between the *delimiter* (the character surrounding each field) and the *separator* (the character between the fields) and you want to specify the *separator* here, I'll bet.
 

Hi danfreeman

Perfect! That was the problem and the sollution.
Code:
APPEND FROM myfile.txt DELIMITED WITH [b]CHARACTER ,[/b]
Many thanks and a star for your quick reply.

(And you are right about the help file)

Kind regards

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top