![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have been trying to connect to an .mdb file protected by a password created using Access 2003. I fond some information on Microsoft DAO Database: The connect argument is expressed in two parts: the database type, followed by a semicolon ( and the optional arguments. You must first provide thedatabase 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: "FoxPro 2.5; pwd=mypassword" My Code is: Set dbsC = OpenDatabase(Path + "\C.mdb",,,"ODBC; pwd=mypassword") This will result in Run Time Error 3031: Not a valid password Help Anyone plz! |
#3
| |||
| |||
|
|
What the help file fails to mention is that while the 2nd and 3rd parameters are optional in the OpenDatabase statement, if you leave them out, the 4th parameter is ignored. Try Set dbsC = OpenDatabase(Path + "\C.mdb", False, False, "ODBC; pwd=mypassword") -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Oin Zea" <OinZea (AT) hotmail (DOT) com> wrote in message news:rwgLd.1743$Rj2.558 (AT) fe39 (DOT) usenetserver.com... I have been trying to connect to an .mdb file protected by a password created using Access 2003. I fond some information on Microsoft DAO Database: The connect argument is expressed in two parts: the database type, followed by a semicolon ( and the optional arguments. You must first providethe 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: "FoxPro 2.5; pwd=mypassword" My Code is: Set dbsC = OpenDatabase(Path + "\C.mdb",,,"ODBC; pwd=mypassword") This will result in Run Time Error 3031: Not a valid password Help Anyone plz! |
#4
| |||
| |||
|
|
What the help file fails to mention is that while the 2nd and 3rd parameters are optional in the OpenDatabase statement, if you leave them out, the 4th parameter is ignored. Try Set dbsC = OpenDatabase(Path + "\C.mdb", False, False, "ODBC; pwd=mypassword") -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Oin Zea" <OinZea (AT) hotmail (DOT) com> wrote in message news:rwgLd.1743$Rj2.558 (AT) fe39 (DOT) usenetserver.com... I have been trying to connect to an .mdb file protected by a password created using Access 2003. I fond some information on Microsoft DAO Database: The connect argument is expressed in two parts: the database type, followed by a semicolon ( and the optional arguments. You must first providethe 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: "FoxPro 2.5; pwd=mypassword" My Code is: Set dbsC = OpenDatabase(Path + "\C.mdb",,,"ODBC; pwd=mypassword") This will result in Run Time Error 3031: Not a valid password Help Anyone plz! |
![]() |
| Thread Tools | |
| Display Modes | |
| |