b3cf
asked on
How to connect to Access using VB.net
Hi
Could someone advise me on how I could connect to an Access database using a datasource with VB.Net and create a recordset.
Any help is greatly appreciated
thanx
Could someone advise me on how I could connect to an Access database using a datasource with VB.Net and create a recordset.
Any help is greatly appreciated
thanx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim rs As New ADODB.Recordset
rs.Source = "SELECT * FROM Table"
rs.ActiveConnection = "Provider=Microsoft.Jet.OL
rs.Open
Dim ConnStr as String
ConnStr=""Provider=Microso
MyConn= new OleDbConnection(ConnStr)
If u have database Protected with Userid add "Userid=xxxx;Password=xxxx
Once Connection is Opened other opearations are same as common OleDb operations