how to connect ms access database in visual .net 2005

iameak

New member
Joined
Jan 23, 2006
Messages
2
Programming Experience
Beginner
how to connect to ms acces in visual basic 2005
and how to show data in datagrid ?

forgive for my english
 
Hi

For the connections just go to www.connectionstrings.com.

Here u will find the appropriate connection strings for connecting to access database.

Next just follow-up the code:
dim cn as new oledbconnection
dim ds as new dataset
dim adapter as new oledbdataadapter("Select * from <Table Name>", cn)

apater.fill(ds, <Table Name>)

datagrid.datasource=ds.tables(<Table Name>)

U can also create data views as a datasource.
 
Back
Top