I have had NO LUCK connecting to an Access Database using ODBC in
ADO.
I have a database on a machine named AZ74Web01. This machine is running
Windows 2000 Server.
On this machine I have configured an ODBC Data Source using the ODBC
Data Source Administrator. The ODBC datasource name is "MMSTC_people"
and it is configured with the Microsoft Access Driver (*.mdb).
The database is demonstrably accessible through ODBC using a Perl Script
that does ODBC access (running it on the server as a CGI script) so I know
that
the ODBC setup is OK.
I'm trying to write a VB app to read from this database (from my W2K desktop
which is not the server machine). I just can't seem to get past a certain
error(s).
I am somewhat mystified by Connection Strings since every piece of
documentation
I've looked at says something different.
If I use the following:
cst = "Provider=MSDASQL; Server=AZ74Web01; DSN=MMSTC_people;"
Set objConn = New ADODB.Connection
objConn.Errors.Clear
objConn.CursorLocation = adUseClient
objConn.Open cst
If objConn.Errors.Count > 0 Then
For Each errObj In objConn.Errors
MsgBox (Hex(errObj.Number) & " - " & errObj.Description & vbCrLf &
_
errObj.NativeError & " - " & errObj.Source & vbCrLf &
errObj.SQLState)
Next
End If
I get the following error in one of the error objects:
0 - [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
0 - Microsoft OLE DB Provider for ODBC Drivers
IM006
And I get the following error in 5 error objects:
0 - [Microsoft][ODBC Microsoft Access Driver] Invalid connection string
attribute Server
8 - Microsoft OLE DB Provider for ODBC Drivers
01S00
SO - what's wrong with the connection string, and what does the error
information
tell me?
I am totally buffalo'ed here - I can work with databases just fine using
DSN-less
connections, but I simply cannot get an ODBC connection established. I've
tried
just about every combination of Connection String gobbledygook I can find
and
nothing works for me. WHAT'S THE SECRET ?!?
If at all possible respond directly through email to
our news feed access is unpredictable at best.
Regards and Thanks in Advance,
Carl