|
-
Dec 5th, 1999, 10:05 PM
#1
Thread Starter
New Member
Hi there!
Need help on VB5. I tried number of times to Open MSAccess data(I protect with a password on it), when I run my program in VB5 & it prompt me "Run-time error 3031, Not a valid password, therefore I can't open it. Anyone can help me, how to decode MSAccess password in VB5 statement. Thanks
Rgds,
Sam
-
Dec 5th, 1999, 10:10 PM
#2
This is DAO
DBEngine.SystemDB = C:\MyPath\My.MDA"
DBEngine.DefaultUser = "MyUserName"
DBEngine.DefaultPassword = "MyPassword"
------------------
Marty
-
Dec 5th, 1999, 10:14 PM
#3
Thread Starter
New Member
Thanks Marty, will try it out...
Rgds,
Sam
-
Dec 6th, 1999, 05:48 PM
#4
Thread Starter
New Member
Hi Marty,
It still prompt me "Run-time error 3031, Not a valid password"
I protected MSAccess file with password(Not the Admin/User password).
Rgds,
Sam
-
Dec 6th, 1999, 06:10 PM
#5
Thread Starter
New Member
-
Dec 7th, 1999, 02:02 AM
#6
Member
Accessing a password protected MSAccess database:
Using DAO...
Code:
Dim db As DAO.Database
Set db = DBEngine(0).OpenDatabase("C:\YourDatabase.mdb", True, False, ";pwd=YourPassword")
Using ADO...
Code:
Dim cn as ADODB.Connection
Set cn = New ADODB.Connection
cn.Provider = "Microsoft.Jet.OLEDB.3.51"
cn.ConnectionString = "Data Source=C:\YourDatabase.mdb;Jet OLEDB :database password=YourPassword"
cn.CursorLocation = adUseClient
cn.Open
[This message has been edited by Gerald (edited 12-07-1999).]
-
Dec 8th, 1999, 06:15 PM
#7
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|