Connecting Tech Pros Worldwide Help | Site Map

Export DataGridView to Access with .net

Newbie
 
Join Date: Oct 2008
Posts: 3
#1: Oct 23 '08
Hello,
I have a program that loads a datagridview from excel to visual studio. Can anyone tell me how to export the cell values of the datagridview to my access database?
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,714
#2: Oct 24 '08

re: Export DataGridView to Access with .net


I suspect you will get more help from the .NET team on this one, although you should explain which flavour of .NET you are using. Please update with relevant details.

I will move it across for you.
insertAlias's Avatar
Forum Leader
 
Join Date: Apr 2008
Location: San Antonio, TX (USA)
Posts: 2,608
#3: Oct 24 '08

re: Export DataGridView to Access with .net


If you have a datagridview, then you have the underlying DataTable available, right? The datagridview's DataSource property should point to it.

You can set up an OleDb connection to access and loop through your DataTable, doing INSERTs.
Reply