Have a simple program which works fine working with an Access DB. Thought it would be a simple matter to Password protect the DB. Can't get it to go. First I tried the old VB3.0 statement SetDefaultWorkspace "Admin" , "MyPW".
Thought this would be compatible w/VB6. It resulted in a compile error: "Function or interface marked as restricted...etc". Being new to VB6, then thought maybe I had to use the OpenDataBase function. Got the impression the DataBaseName property had to be set first. So tried various forms of:
Dim d as DataBase
Set d = OpenDataBase(localpath,True,false," ;PWD=MyPW"
This resulted in VB message "Not a Valid Password". It appears that a Password check is done when I place the DataBaseName property in the DAO control. So moved the OpenDataBase function prior to setting the property and now I get run-time error on the OpenDatabase function which
says "Couldn't Find Installable Isam - error 3170".
None of this makes any sense to me. First why can't I use the simple old SetDefaultWorkspace statement? Secondly, if not, then how are you suppose to pass a password to Access if not by the above mentioned mechanism?
Does anyone understand all of this? This novice is at a loss. Thanks in advance for any clarification of this.
Thought this would be compatible w/VB6. It resulted in a compile error: "Function or interface marked as restricted...etc". Being new to VB6, then thought maybe I had to use the OpenDataBase function. Got the impression the DataBaseName property had to be set first. So tried various forms of:
Dim d as DataBase
Set d = OpenDataBase(localpath,True,false," ;PWD=MyPW"
This resulted in VB message "Not a Valid Password". It appears that a Password check is done when I place the DataBaseName property in the DAO control. So moved the OpenDataBase function prior to setting the property and now I get run-time error on the OpenDatabase function which
says "Couldn't Find Installable Isam - error 3170".
None of this makes any sense to me. First why can't I use the simple old SetDefaultWorkspace statement? Secondly, if not, then how are you suppose to pass a password to Access if not by the above mentioned mechanism?
Does anyone understand all of this? This novice is at a loss. Thanks in advance for any clarification of this.