Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everybody
Hope someone can help me, I am new to visual basic and need a bit of help.
I have imported some data from an excel sheet into a datagrid, what I am struggling to do is to pass this infomation into an sql database, I already have the table created called ImportInfo and the database is called mydb. The datagridview is called DataGridView1
Any help would be gratefully received

Thanks
Posted
Comments
Mohd Wasif 23-Oct-10 3:15am    
U can directly import data from excel to sql server

Hope, First Data will be Loaded into DataTable or DataSet
While u r assigning Datatable or DS to Datagridview..

Loop Through DataTable or Dataset and insert the Records.

For Exa:
DGrid.Datasource=Dt;
for(int i=0;i<dt.rows.count;i++)
{
//stmts
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900