G
Guest
Hello,
I have already done this with ADo and now I'm testing my skill with DAO.
Results: failure...all day failure... That's why I'm here.
I'm writing a very little apps that should just connect a secured database
and make few changes in a table (deleting/changing data).
I would really love to get this done by using DAO, but it seems I'm missing
something...i.e. I cannot connect at all and I'm collecting all the possible
error messages. Too much, also for my ego. So here I'm...desperatly asking
for some help!!
The database that I need to update is secured. It has is .mdw file and it is
launched trough a shortcut. This means Access will still continue using his
system/mdw for any other databases created on the pc.
The small apps I'm going to build is not secured at all: once is work is
done it will be deleted.
Here is what I wrote:
Private Sub Command0_Click()
Dim DBdaAgg As Database
Dim wrkSec As Workspace
Dim TBLdaAgg As DAO.Recordset
Set wrkSec = CreateWorkspace("newwrksec", "myusername", "mypassword",
dbUseJet)
Set DBdaAgg = wrkSec.OpenDatabase("grant2000try.mde")
With DBdaAgg
Set TBLdaAgg = .OpenRecordset("dspc_patient", dbOpenTable, dbDenyWrite,
dbPessimistic)
With TBLdaAgg
MsgBox .Fields(0)
End With
End With
TBLdaAgg.Close
DBdaAgg.Close
wrkSec.Close
Set TBLdaAgg = Nothing
Set DBdaAgg = Nothing
Set wrkSec = Nothing
End Sub
myusername and mypassword are the username and the password which refer to
me in the .mdw file the secured database uses.
What I think is missimng...somewhat... is a reference to this .mdw file.
Boh, help!
Rocco
I have already done this with ADo and now I'm testing my skill with DAO.
Results: failure...all day failure... That's why I'm here.
I'm writing a very little apps that should just connect a secured database
and make few changes in a table (deleting/changing data).
I would really love to get this done by using DAO, but it seems I'm missing
something...i.e. I cannot connect at all and I'm collecting all the possible
error messages. Too much, also for my ego. So here I'm...desperatly asking
for some help!!
The database that I need to update is secured. It has is .mdw file and it is
launched trough a shortcut. This means Access will still continue using his
system/mdw for any other databases created on the pc.
The small apps I'm going to build is not secured at all: once is work is
done it will be deleted.
Here is what I wrote:
Private Sub Command0_Click()
Dim DBdaAgg As Database
Dim wrkSec As Workspace
Dim TBLdaAgg As DAO.Recordset
Set wrkSec = CreateWorkspace("newwrksec", "myusername", "mypassword",
dbUseJet)
Set DBdaAgg = wrkSec.OpenDatabase("grant2000try.mde")
With DBdaAgg
Set TBLdaAgg = .OpenRecordset("dspc_patient", dbOpenTable, dbDenyWrite,
dbPessimistic)
With TBLdaAgg
MsgBox .Fields(0)
End With
End With
TBLdaAgg.Close
DBdaAgg.Close
wrkSec.Close
Set TBLdaAgg = Nothing
Set DBdaAgg = Nothing
Set wrkSec = Nothing
End Sub
myusername and mypassword are the username and the password which refer to
me in the .mdw file the secured database uses.
What I think is missimng...somewhat... is a reference to this .mdw file.
Boh, help!
Rocco