Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB/Access Security
Message
De
19/07/2000 14:13:36
Michael Tustison
Professional Services Industries
Homewood, Illinois, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
VB/Access Security
Divers
Thread ID:
00394446
Message ID:
00394446
Vues:
38
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
Fil
Voir

Click here to load this message in the networking platform