Wednesday, August 11, 2010

How to retrieve MsAccess data to datagrid in visual studio 2003,vb?

Anybody please help me out in this,urgent!


Thanks in advance.How to retrieve MsAccess data to datagrid in visual studio 2003,vb?
just follow the steps





1. create an OLEDB connection that points out to your access database





2. then with the following lines





dim da as new DataAdapter(new OledbCommand(your_sqlquery, youroledbconnection))





dim dt as DataTable


da.Fill(dt)





datagrid.DataSource = dt


datagrid.DataBind

No comments:

Post a Comment