Password Protected Database -- Access 7, VB 4 32-bit 
Author Message
 Password Protected Database -- Access 7, VB 4 32-bit

How do I open a password protected database through VB4, 32-bit?  It's just
a password protection -- no fancy users/groups/workspace stuff.

--
Thank You!
Angel Yoakum
Landrum & Brown, Inc.

http://www.*-*-*.com/



Sun, 27 Aug 2000 03:00:00 GMT  
 Password Protected Database -- Access 7, VB 4 32-bit

Give something like this a shot:

Dim dbsMain As Database, strDBName As String

strDBName = "c:\dbstuff\main.mdb"

DBEngine.SystemDB = "c:\dbstuff\system.mdw"
DBEngine.DefaultUser = "Rumplestiltskin"
DBEngine.DefaultPassword = "straw2gold"

On Error Resume Next
Set dbsMain = DBEngine.Workspaces(0).OpenDatabase(strDBName, False,
False)
If Err Then
   MsgBox "Can't open the database:" & vbCrLf & Err.Description
   End
End If
On Error Goto 0



How do I open a password protected database through VB4, 32-bit?  It's just
a password protection -- no fancy users/groups/workspace stuff.

--
Thank You!
Angel Yoakum
Landrum & Brown, Inc.

http://www.landrum-brown.com



Mon, 28 Aug 2000 03:00:00 GMT  
 Password Protected Database -- Access 7, VB 4 32-bit

Quote:



>How do I open a password protected database through VB4, 32-bit?  It's just
>a password protection -- no fancy users/groups/workspace stuff.

If it is just a password on the database itself:

    Dim mdb As Database
    Dim strDatabaseName As String
    Dim strPassword As String

    Set mdb = OpenDatabase( _
            strDatabaseName, False, False, _
            ";pwd=" & StrPassword)

-- Rick
--

(Rick Rutt is a system architect living and working in metropolitan Detroit.)



Mon, 28 Aug 2000 03:00:00 GMT  
 Password Protected Database -- Access 7, VB 4 32-bit

Do you mean a simple password protected database?
if so see www.microsoft.com/kb article id: q161016
e.g.:
   Set ws = DBEngine.Workspaces(0)
   Set Db = ws.OpenDatabase(<Database path>, <Exclusive>, <ReadOnly>, "MS
Access;PWD=<Password>")


:How do I open a password protected database through VB4, 32-bit?  It's just
:a password protection -- no fancy users/groups/workspace stuff.
:
:--
:Thank You!
:Angel Yoakum
:Landrum & Brown, Inc.

:http://www.landrum-brown.com



Mon, 28 Aug 2000 03:00:00 GMT  
 Password Protected Database -- Access 7, VB 4 32-bit

 Dim Db as DataBase

Set Db = OpenDataBase("MyDataBaseName",false,false,";PWD=DataBasePassword")

You must not forgeth the ; in the last parameter

Luis Damas



Mon, 28 Aug 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Password Protected Database -- Access 7, VB 4 32-bit

2. Password Protected Database -- Access 7, VB 4 32-bit

3. Password Protected Database -- Access 7, VB 4 32-bit

4. VB 4.0 (32-bit) accessing password protected Access 7.0 database

5. VB 4.0 (32-bit) accessing password protected Access 7.0 database

6. VB 4 32-bit and Access 2.0 databases

7. Help. VB(32) and Access 7.0 (Database password)

8. Convert 32-BIT MDB Database to 16-bit database

9. How to create 32-bit DLL in Watcom C and call from 32-bit VB

10. Accessing 16-bit DLL from 32-bit VB

11. TIME TO WIN 32-Bit DLL for VB 4.0 32-Bit or Higher (VB5)

12. TIME TO WIN 32-Bit (v4.04) (+750 functions) for VB 4.0 32-Bit

 

 
Powered by phpBB® Forum Software