Thursday, June 24, 2010

VB.Net 2008 OleDb Connect to MS-Access with Password (Visual Basic 2008)

To day i have found the way, how to make connection from VB.Net 2008 to Ms. Access from my friend block then i would like to keep on my block as well, if you interest then please try it with me here below.
As New OleDb.OleDbConnectioncon.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()

Refference sourceIech Setha