Saving dataset into access

Can someone provide me with a small snipplet to store a dataset into access database?

Who is Participating?
Hi godwindotnet

I answered another question that although was driven by a need to understand the datagrid, I posted code in order to take data and populate an access database.

This is the link

Let me know if you want any more info or explanation

HTH :)
I've got a VB.Net module that will do what I think you're after...

It's designed for "archiving" a DataSet to a new Access mdb file... so it contains lots of code for creating the MDB file (if it doesn't exist) and creating the Table (if it doesn't exist).  Then towards the bottom of the code, it actually does the copying of data.  

It uses COM-based ADOX library so it's a bit faster than a "native" .Net solution.

it works like this:

    Copy_dt2MDB(DataTable, "C:\Testing.mdb", False, "Table1")
...are we done here?
godwindotnetAuthor Commented:
Yeah,there you go..Ive given the points..:)
But I wish you couldve given me a little snipplet for this job.It wouldve been more handy than all that code.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.