Reputation: 493
I have converted a .mdb file to CSV format using ado.net and then looping on the recordset and writing the data in a .csv file.
Now I need to do the reverse. I have to convert the CSV file to a .mdb file (an access table to be specific). Is there any programming code to help me out with this?
Upvotes: 2
Views: 3800
Reputation: 5825
A simpler solution would be to run the DoCmd.TransferDatabase command. Same deal to exporting the data, which you have already done the hard way. You can do this by importing the Access Object library. This is a COM library, but there may be a .net version too. This takes care of everything in one command. You do not have to bother with low level details at all.
Upvotes: 1
Reputation: 557
As MS Access supports ODBC, you can read your CVS file as usual text-file, parse it and run insert/update script in your MS Access database.
Check MSDN for details
Upvotes: 2
Reputation: 2527
You can use .CSV directly in the OleDB from the tutorial here http://www.codeproject.com/KB/cs/UsingJetForImport.aspx and write it back to your .mdb files/tables.
Upvotes: 1