Hi all!
I want to make a versionmanager that will automatically copy the newest version of my frontend on the server to the workstation.
I'm using the access security by using a custom .MDW file, with a disgranted admin group in it.
In the frontend I have a local versiontable, in with I want to put a version number. When the versionnumber in the frontend on the server higher is then the versionnumber in the local frontend, the frontend is copied and locally opened.
The problem is the following:
- When I want to open one of the frontends using an adodb connection, I am granted the access, but I can't open the table with the version number with the following error: -2147217911, cannot select. I don't have privileges to read the table.
How can I force Access to use the login I entered when I opened the frontend?
This is my (test) code:
as you can see the code is not yet finished, but maybe you can help me? the rst. statement gives the error.
Thanks!
Tom
I want to make a versionmanager that will automatically copy the newest version of my frontend on the server to the workstation.
I'm using the access security by using a custom .MDW file, with a disgranted admin group in it.
In the frontend I have a local versiontable, in with I want to put a version number. When the versionnumber in the frontend on the server higher is then the versionnumber in the local frontend, the frontend is copied and locally opened.
The problem is the following:
- When I want to open one of the frontends using an adodb connection, I am granted the access, but I can't open the table with the version number with the following error: -2147217911, cannot select. I don't have privileges to read the table.
How can I force Access to use the login I entered when I opened the frontend?
This is my (test) code:
Code:
Public Function testmgr()
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim lv_filename_local As String
Dim lv_filename_server As String
Dim lv_version_local As String
Dim lv_version_server As String
Set cnn = CurrentProject.Connection
rst.Open "Select * from tVersie", cnn, adOpenKeyset, adLockReadOnly, adCmdTableDirect
lv_filename_local= rst!ver_locatie_lokaal & rst!ver_filenaam
lv_filename_server = rst!ver_locatie_server & rst!ver_filenaam
rst.Close
cnn.Close
With cnn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Data Source") = lv_filename_local
.Open
End With
rst.Open "SELECT max(versie) as versie from tbl_ALG_versie", cnn, adOpenKeyset, adLockReadOnly, adCmdTableDirect
lv_version_local = rst!versie
End Function
Thanks!
Tom