Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSAcces Databases's Password 1

Status
Not open for further replies.

sakti

Programmer
Dec 7, 1999
3
ID
what must I do to open MSAcces Databases's Password with VB Interfaces ?
 
Hi

With DAO
Code:
Dim db As Database
Set db = DBEngine.OpenDatabase( _
         "D:\db1.mdb", False, False, ";pwd=YourPassword")
With ADO (2.5 SP1)
Code:
Dim conn As ADODB.Connection

Set conn = New ADODB.Connection

With conn
   .CursorLocation = adUseClient
   .Provider = "Microsoft.Jet.OLEDB.4.0"
   .Properties("Data Source") = "d:\db1.mdb"
   .Properties("Jet OLEDB:Database Password") = "YourPassword"
   .Open
End With


Dim rst As Recordset

Set rst = conn.Execute("Select * From Argus2000")

NOTE: If you do not have Jet 4 then replace this string
.Provider = "Microsoft.Jet.OLEDB.4.0"

With this one
.Provider = "Microsoft.Jet.OLEDB.3.51"

Seasons Greetings
caf
 
thanx caf

I've been searching for an alternative to DAO so I find this post useful.

fb

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top