Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting .dat to .dbf database file
Message
From
21/01/2003 17:48:05
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00743964
Message ID:
00744036
Views:
19
>I think it's almost there, all the field names are brought in but it only imports the first column and all the rest are blank. The syntax from the help states:
>APPEND FROM FileName | ?
> [FIELDS FieldList]
> [FOR lExpression]
> [[TYPE] [DELIMITED [WITH Delimiter | WITH BLANK | WITH TAB
> | WITH CHARACTER Delimiter]
> | DIF | FW2 | MOD | PDOX | RPD | SDF | SYLK
> | WK1 | WK3 | WKS | WR1 | WRK | CVS
> | XLS | XL5 [SHEET cSheetName] | XL8 [SHEET cSheetName]]]
>so I tried APPEND FROM table.dat FIELDS all TYPE DELIMITED WITH '|'
>but the variable 'All' is not found. The table has 51 fields so how do I get it to bring in all of them?
>Thanks!
>Max
>
>>you need to look a little harder at the command... read the TYPE options >and the DELIMITED options...
>
>>essentially APPEND FROM x.dat DELIMITED WITH '|'
>
>>When I try that it gives an error message stating "Not a table". I've tried "APPEND FROM table.txt" and "APPEND FROM table.dat" but with the same result. What else can I try?
>>Thanks!
>>Max
>>
>>>Take a look at APPEND FROM command. It allows to directly import text files >of different format into predefined cursor/table.

Do you have field names as the first line of data in this file? Then try this:

APPEND FROM yourfile.dat TYPE CSV

Did you also create a table with your 51 fields (appropriately sized) in it first?
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform