ClulessChris
IS-IT--Management
Sorry if you find this question inappropraite to this forum (I'm kind o desperate). I'm using VBS to connect to an access 97 database. This works fine until I password protect the database. When trying to connect to a password protected database I get the err "Cannot start your application. The workgroup information file is missing or opened exclusively by another user."
Function Item_Open()
Dim sSelect
'On Error Resume Next
If Item.SenderName = "" Then
sSelect
= "V:\ServiceSelector\ServiceSelector.mdb"
Set m_adoSerSel = OpenAccessDB
(sSelect, "admin", "irate"
End If
End Function
Function OpenAccessDB(sDBPath, UID, PWD)
Dim objADOConn
Dim sConn
'On error Resume next
sConn = "Provider=Microsoft.Jet.OLEDB.4.0; " &_
"Data Source=" & sDBPath & "; " &_
"User ID=" & UID & "; " & _
"Password=" & PWD & "; "
Set objADOConn = CreateObject("ADODB.Connection"
ObjADOConn.Open sConn
If (err = 0) And (objADOConn.State = adStateopen)
Then
Set OpenAccessDb = objADOConn
Else
Set OpenAccessDB = Nothing
End If
Set objADOConn = Nothing
End Function
Please Note I've commented out the error handlers to help
debugging (but it didn't help that much). Any help or pointer you may be able to give will be much appreciated.
Function Item_Open()
Dim sSelect
'On Error Resume Next
If Item.SenderName = "" Then
sSelect
= "V:\ServiceSelector\ServiceSelector.mdb"
Set m_adoSerSel = OpenAccessDB
(sSelect, "admin", "irate"

End If
End Function
Function OpenAccessDB(sDBPath, UID, PWD)
Dim objADOConn
Dim sConn
'On error Resume next
sConn = "Provider=Microsoft.Jet.OLEDB.4.0; " &_
"Data Source=" & sDBPath & "; " &_
"User ID=" & UID & "; " & _
"Password=" & PWD & "; "
Set objADOConn = CreateObject("ADODB.Connection"

ObjADOConn.Open sConn
If (err = 0) And (objADOConn.State = adStateopen)
Then
Set OpenAccessDb = objADOConn
Else
Set OpenAccessDB = Nothing
End If
Set objADOConn = Nothing
End Function
Please Note I've commented out the error handlers to help
debugging (but it didn't help that much). Any help or pointer you may be able to give will be much appreciated.