dBase & ODBC woes

  • Thread starter Derek Griffiths
  • Start date
D

Derek Griffiths

Most of the complicated programs I write are boring applications that
manipulate databases associated with the medical billing program where I
work. The program uses foxpro dbases (version 3) for all of its' data.

I'm running into a strange problem that I believe has something to do with
the actual dbase file, but I couldn't find anything on google. Each group
of doctors has its' own patient and billing tables.

I can read the billing table in all cases, but the patient files don't
work for one group of doctors. I think it is because of the memo field. In
Dbase 3, memos are basically kept in a seperate file. I am pretty sure
that this particular database has a corrupted memo field, but I'm not sure
what I can do about it.

The version of Foxpro that is available, 2.5a, is 16 bit and woefully out
of date. It only lets me rebuild the index and repack the database. I've
tried both without result. The database in question is huge with over
150000 records, so I can't start over. I've tried exporting the data to a
new file, but the problem exports with it.

The exception that gets thrown when my program attempts to access this
table is Microsoft.Data.OdbcException "Error [HY000][Microsoft][ODBC dBase
Driver] External table is not in the expected format." I think this might
be because the table reports its' version number as -117 instead of three.

Does anyone have any suggestions at all on how to fix or work around this
problem?

Thanks,

Derek
 
N

Nicholas Paldino [.NET/C# MVP]

Derek,

How are you copying the data over? If you are doing the equivalent of
"copy to", then it might just do a straight file copy.

What I would do is actually create a new table, and then manually move
records over (when I say manually, in dBase, I would say "create table..."
and then cycle through the rows in the old table, scattering memvar (can you
do that in dBase? You can in FoxPro), appending a blank record, and then
gathering memvar.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top