I am trying to connect to an external source using an ADO connection but not having much success. I believe their is some type of security but I know the username and there is no password so I'm wondering why I cant open the connection. When I run the code below I get an error message that says "Cannot start your application. The workgroup information file is missing or opened exclusively by another user."
Here is my code so far
Sub GetCribHours()
Dim strdb As String, strSQL As String
Dim cnt As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim fld As Field
strdb = "N:\cribmastersql\SQL Link for Queries.mdb"
strSQL = "SELECT AssetNo,WOComment,DateClosed FROM WO;"
cnt.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = " & strdb & ";" & _
"User Id= sa;" & _
"Password="
Set rst = cnt.Execute(strSQL)
End Sub
I tried putting admin instead of sa and I got an ODBC connection to crib failed alarm.
Any help in the right direction would be nice.
Thanks, Rib
Bartender:Hey aren't you that rope I threw out an hour ago?
Rope:No, I'm a frayed knot.
Here is my code so far
Sub GetCribHours()
Dim strdb As String, strSQL As String
Dim cnt As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim fld As Field
strdb = "N:\cribmastersql\SQL Link for Queries.mdb"
strSQL = "SELECT AssetNo,WOComment,DateClosed FROM WO;"
cnt.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = " & strdb & ";" & _
"User Id= sa;" & _
"Password="
Set rst = cnt.Execute(strSQL)
End Sub
I tried putting admin instead of sa and I got an ODBC connection to crib failed alarm.
Any help in the right direction would be nice.
Thanks, Rib
Bartender:Hey aren't you that rope I threw out an hour ago?
Rope:No, I'm a frayed knot.