I downloaded the Security Wizard and followed the directions in the white
paper from Microsoft. All went well. I was able to secure my database. I
then tried to get to it from VB4 using DAO code. I kept getting an error
saying that I could not read it. The white paper speaks of using the
"workspace" property. I used the following code:
'Setup call to the database and validate login and password
Dim MyWorkspace As Workspace, MyDb As Database, MyRs As Recordset
Dim MyLogin As Field, MyPassword As Field, MySecretary As Field, MyType As
Dim i As Integer, Login As String, Password As String
Set MyDb = OpenDatabase("C:\MYDB.MDB")
Set MyRs = MyDb.OpenRecordset("Login", dbOpenDynaset) '******BLOWS UP ON
THIS LINE *****
Set MyLogin = MyRs.Fields("Login")
Set MyPassword = MyRs.Fields("Password")
Set MySecretary = MyRs.Fields("Secretary")
Set MyType = MyRs.Fields("Role")
lblMsg.Caption = "Please wait, validating login..."
When it stops execution, I get the message "You do not have read
permissions on this database".
Q1) How do I pass the login and password for the database which is separate
from the login that I am using for each person? This is an MS Access
Set MyWorkspace =
Q2) I want to use the Data Control to do the rest of the screens. This
also blows up and I am not sure how I set the
password and login for a data control. Once I am logged in, will the
connection remain open until I close the
database and will this allow the data control to work?
Thanks for any help!