Information générale
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
I'm trying to secure an Access 97 database with a database-level password so that it can only be opened from a VB6 application using an ADO DataControl with the following code...
Const mstrDBPATH As String = App.Path & "\MyDB.mdb"
Const mstrPASSWORD As String = "test"
Const mstrUSER As String = "admin"
Private Sub Form_Load()
With adoArticle
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Persist Security Info=True;Data Source=" & mstrDBPATH & _
"; Mode=Read|Write"
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.CommandType = adCmdText
.RecordSource = "SELECT * FROM Articles Order By Title"
.UserName = mstrUSER
.Password = mstrPASSWORD
.Refresh
End With
End Sub
I get the following error message...
ErrorNumber: 3661
Scode: -2147217843
Description: Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
However, the workgroup information file is NOT missing or opened. What am I doing wrong? Do I need to set up user-level security? Is my ConnectionString syntax incorrect? I'd be very grateful for any clues whatsoever.
Thanks,
Michael
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement