Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB/Access Security
Message
From
19/07/2000 14:13:36
Michael Tustison
Professional Services Industries
Homewood, Illinois, United States
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
VB/Access Security
Miscellaneous
Thread ID:
00394446
Message ID:
00394446
Views:
39
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
Next
Reply
Map
View

Click here to load this message in the networking platform