Hi Guys,
I'm getting an error when I'm trying to connect and get some information
from external database which is not linked to my front using the below code:
The external db is under my the same workgroup and I'm already joined. I
know, Linking will solved my problem but I don't want due to some issues:
Code on Load:
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strCN As String
Dim strRS As String
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
strCN = "Provider=Microsoft.Jet.OLEDB.4.0;Password=modiegodiego;User
ID=MO Administrator;Data Source=C:\az\MOrganizer\MOmaster.mdb;Persist
Security Info=True"
strRS = "SELECT * FROM MSysAccounts"
cn.Open strCN
rs.Open strRS, cn
rs.MoveFirst
Do While Not rs.EOF
rs.MoveNext
Loop
MsgBox "Total: " & rs.RecordCount
ERROR:
Cannot start your application. The workgroup information file is missing or
open exclusively by another user.