We help IT Professionals succeed at work.

Saving dataset into access

godwindotnet
godwindotnet asked
on
Medium Priority
375 Views
Last Modified: 2010-08-05
Hello,
Can someone provide me with a small snipplet to store a dataset into access database?

Thanks,
Godwin
Comment
Watch Question

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   http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21780852.html

Let me know if you want any more info or explanation

HTH :)

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Commented:
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")

http://home.hot.rr.com/graye/Temp/dt2mdb.vb
...are we done here?

Author

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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.