VB.Net 2008 OleDb Connect to MS-Access with Password

Dim con As New OleDb.OleDbConnection
con.ConnectionString = “Provider=Microsoft.Jet.OLEDB.4.0; Data Source=” & _
                                 Application.StartupPath & “\dbstudent.mdb;” & _
                                 “Jet OLEDB:Database Password=12345”

con.Open()
‘———————-
Dim da As New OleDb.OleDbDataAdapter(“SELECT * FROM tblstudent”, con)
‘———-

con.Close()
con.Dispose()

http://www.krookroo.com/programming-languages/ms-visual-basic-20052008/87-it-vb9-8.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: