I have a database that will be accessed by an excel file, my DB has a Password and I would like to know if it's possible to set that password in the code so that the user will not have to enter this password.
I believe that by using the DBENGINE.OpenDatabase method, you can open the database via passing a password as one of the parameters. Example (from the MS Access Help):
The connect argument is expressed in two parts: the database type, followed by a semicolon ( and the optional arguments. You must first provide the database type, such as "ODBC;" or "FoxPro 2.5;". The optional arguments follow in no particular order, separated by semicolons. One of the parameters may be the password (if one is assigned). For example:
I don't mean to come across the wrong way, but if you set the password in code, doesn't that defeat the purpose of having a password on the database in the first place?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.