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 |
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 |
All times are GMT +1. The time now is 03:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com