hi,
Here is the code to connect to the database in Ms Access.
Connection string for MS Access via OLE DB:
Dim connection As OleDbConnection
connection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NorthWind.mdb;User Id=;Password=;")
connection.Open();
After connecting to the database
dim da as new oledb.oledbdataadapter("your query",connection)
dim ds as new dataset
da.fill(ds)
Now u can set the data to the grid....
DataGridView1.DataSource = ds
DataGridView1.DataMember = "table name"
Hope this helps
Refer these:
http://www.homeandlearn.co.uk/net/nets12p6.html
http://www.daniweb.com/software-development/vbnet/threads/44695/retrieve-data-by-vb.net[
^]
http://stackoverflow.com/questions/6353889/how-to-retrieve-data-from-database-using-select-query[
^]
mark it if u find it usseful....