I'm writing a C# program to convert a FoxPro database to XML, and everything works except the memo field is blank. Is there something I'm missing to convert that bit?
I'm using C# .Net 3.5 SP1, Visual FoxPro 9 SP 1 OLE DB Driver. Connection string is okay, as all other data is being pulled properly.
When I converted the FoxPro database to SQL Server, the memo field is also blank there, so I can't convert twice.
I use ODBC to link VFP 8 tables and the memo fields work with no problem. I don't know if OLEDB is different.
You might not have Visual FoxPro tables here. Many VFP systems use the same tables as the FoxPro 2 or dBase application they replaced. You could look at the file header or just try one of the other ODBC drivers to see if they work.
Ended up having to do some work myself, but maybe it can help someone else out in the future:
Just grab the result from that and use it as an index into the memo file (that code is pretty simple using the MSDN documentation).
I am not terribly familiar with C# or FoxPro or SQL Server, so I cannot give you much advice in that regard.
However, if you cannot find a suitable driver, you may consider parsing the raw data and memo files yourself. Another question has dealt with this:
What's the easiest way to read a FoxPro DBF file from Python?
Believe it or not, these file formats are quite simple to parse should you decide to write your own C# parser. These specifications are available from Microsoft: