Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Open Access database(DAO) with password protected

Hi All,

How to open Ms Access database (DAO) with password protected using
OPENDATABASE method?
Set dbs = DAO.DBEngine.Workspaces(0).OpenDatabase("c:\ABC.MD B")
Where I have to put the password?
TIA

Yanto




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Open Access database(DAO) with password protected

You'll find more support in these ng if you use ADO. FWIW, here's some
DAO code to open a .mdb Jet database file using workgroup security:

Sub test()
Dim wks As DAO.Workspace
Dim db As DAO.Database

With DAO.DBEngine
.DefaultUser = "sa"
.DefaultPassword = "password"
.SystemDB = "C:\MSOffice\Access\system.mdw"
Set wks = .CreateWorkspace("Working", "sa", "password")
End With

Set db = wks.OpenDatabase("c:\MyDB.mdb", True, False)

' code continues ...

End Sub

--

"Yanto" wrote in message ...
Hi All,

How to open Ms Access database (DAO) with password protected using
OPENDATABASE method?
Set dbs = DAO.DBEngine.Workspaces(0).OpenDatabase("c:\ABC.MD B")
Where I have to put the password?
TIA

Yanto

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access to password protected workbook Dr. Schwartz Excel Discussion (Misc queries) 0 January 14th 08 03:11 PM
How to access protected spreadsheet without the password? [email protected] Excel Discussion (Misc queries) 2 January 3rd 07 07:15 PM
How to import data from a password protected Access DB into Excel. Agus Excel Discussion (Misc queries) 0 October 12th 05 05:42 PM
Access protected VB code by initiating password dialog box WashoeJeff Excel Programming 0 January 30th 04 06:09 AM
open Access DB that is password protected Shin[_2_] Excel Programming 1 November 20th 03 12:41 PM


All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"