Reputation: 11
i created a file .dbf with C# code in using OdbcConnection, but when i want to open it with dbase, it says that's not a dbf file, could anyone explain me why and how it could work ?
Upvotes: 1
Views: 609
Reputation: 48139
From your comments, it sounds like something from dBase III Plus. I don't even believe ODBC even existed back in late 80's, early 90's. Going back that far, dBASE didn't even have "Databases", but all the tables were actually free on their own, and as the developer, you would code your relationships to add records, establish keys, etc.
What you may want to do instead is to just create a table based on the format you expect directly from dBASE and just put it empty in a holding folder. Then, when you need it, copy to the destination directory and run from there.
A second option... Go to Microsoft and download their "VFP Ole DB provider" and try using that. You can also try doing an ExecNonQuery and try something like
use SomeTable
copy to YourNewTable type foxplus
which might be the closest output to match that of dBase.
Upvotes: 1