Hi,
Please Please Please anyone out there, if you have a solution, i will highly appreciate as i have searched the internet for 5 days now with no hope.
1st, the versions i am using are Ms Access 2003 & Visual Studio 2005.
Problem
I am using a database password on my MDB (using "set database password"). This is just for my basic security to stop basic users from importing my queries (basic user, i know any advanced guy can hack in, but now that becomes a copyright issue). With this, i would like to use VB (.exe) to open the database without asking the user for the password. I have set up the Db so that the user does not have any control to reset the Db password, e.g. disabling shift overide, etc.
So far i have found two sets of code that still do not do what i want;
1.
Dim oAccess As Microsoft.Offic e.Interop.Acces s.Application
oAccess = New Microsoft.Offic e.Interop.Acces s.Application
oAccess.OpenCur rentDatabase(fi lepath:=Db_path , bstrPassword:=" password")
This code works OK but opens the Db with the full version of access, not in the runtime version.....
2.
Shell(PathName: ="""" & ms_access_path & """" & " " & """" & dbpath & """" & " /runtime")
This code opens the Ms Access DB in runtime but i cannot automatically enter the Db password......
What i need basically is to open my password protected MDB/MDE in /runtime without prompting for the password (password defined in the code of my .exe file)
Any assistance in solving this problem is much appreciated.
Please Please Please anyone out there, if you have a solution, i will highly appreciate as i have searched the internet for 5 days now with no hope.
1st, the versions i am using are Ms Access 2003 & Visual Studio 2005.
Problem
I am using a database password on my MDB (using "set database password"). This is just for my basic security to stop basic users from importing my queries (basic user, i know any advanced guy can hack in, but now that becomes a copyright issue). With this, i would like to use VB (.exe) to open the database without asking the user for the password. I have set up the Db so that the user does not have any control to reset the Db password, e.g. disabling shift overide, etc.
So far i have found two sets of code that still do not do what i want;
1.
Dim oAccess As Microsoft.Offic e.Interop.Acces s.Application
oAccess = New Microsoft.Offic e.Interop.Acces s.Application
oAccess.OpenCur rentDatabase(fi lepath:=Db_path , bstrPassword:=" password")
This code works OK but opens the Db with the full version of access, not in the runtime version.....
2.
Shell(PathName: ="""" & ms_access_path & """" & " " & """" & dbpath & """" & " /runtime")
This code opens the Ms Access DB in runtime but i cannot automatically enter the Db password......
What i need basically is to open my password protected MDB/MDE in /runtime without prompting for the password (password defined in the code of my .exe file)
Any assistance in solving this problem is much appreciated.
Comment