A project I’m working on contains an MDB (acecss database) file. I’d like to export the contents of the tables to text, but am having a hard time finding a way to do it easily using C#. Is there a faster way than using OLEDB and queries?
Update:
Ideally I’d like to not have to statically name each table (there are hundreds) and I have to use .NET 2.0 or below.
There might be a more efficient way, but you could populate the data into a
DataTable, and then export to a text file:Getting data into the
DataTable:Exporting the
DataTableto CSV:EDIT I haven’t tested this, but something like this should work for .NET 2.0.