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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delimited with (*)

Status
Not open for further replies.

acorbally

Programmer
Jan 9, 2001
65
US
I have a file delimited with (*) I want to import or append the data from the text file into a foxpro database. I see plenty of ways how to do it but they require types I am not using. Any thoughts?
 
FPD/W 2.x is a bit limited when using the DELIMITED clause. If you have a file (aa.txt) like this:
1234,*ABCDE*
7890,*abcde*

And then run this code:
Code:
create cursor testtbl (Mynum N(5), Mystr C(10))
append from aa.txt delimited with *
browse
Then you get a proper import. However, usually people think in terms of the file looking like:
1234*ABCDE*another one*
7890*abcde*some data*

Unfortunately that's not what FoxPro expects.

VFP added another syntax:
Code:
append from aa.txt DELIMITED WITH CHARACTER *
BROWSE
And this works as you'd expect. However to get this, you'll need to upgrade to VFP!

Rick

 
Unfortunately the delimited characters I am using are exacly (*) not just *. I think FoxPro is thinking it is a function. Any thoughts on a work around?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top