I have been having problems accessing a relational Access 97 DB, on a computer that does not contain Access. My installation installs all of the DAO support files, but the user does not have access rights to Access the DB. I receive a 3051 Cannot open Jet Database, Already Open Exclusivly, or not proper user rights to view data. How can I allow the data to be viewed without having the user install Access 97 to fix the problem.
Here is a snippet of the function I use to link to the DB.
Private Sub DBOpen(ByVal ExclusiveFlag As Boolean)
' This procedure will return a Nothing db handle if
' exclusive use is requested but cannot be obtained.
On Error GoTo ErrProc
DBEngine.DefaultUser = "Admin"
DBEngine.DefaultPassword = ""
Set ws = CreateWorkspace("", "Admin", "", dbUseJet)
Set db = Nothing
'If Not ExclusiveFlag Then
Set db = ws.OpenDatabase(Param.DBPath, ExclusiveFlag)
'Set db = OpenDatabase(Param.DBPath + BSLASH + DBNAME, ExclusiveFlag)
If Not (TypeName(db) = "Nothing") Then
Set Param.qd = db.QueryDefs("QParameters") ' ugly but faster
If Err.Number = 3356 And ExclusiveFlag Then ' cannot open exclusive
MsgBox "Another user is currently using the database. " + Chr$(13) _
+ "You must close all other programs using the database " + Chr$(13) _
+ "before you can execute this command. ", vbInformation
If Err.Number = 3356 And Not ExclusiveFlag Then
Err.Number = 9102
If Err.Number = 3055 Then
Thank you in advance.
-John M. Forbes