Hi,
I have a small VB 6.0 application using MDAC to communicate with a SQL-Server. The lines below
set up the connection. Now on some computers the
dbccc.open results in an "unknown error" with
"server does not exist" or "database xy does not exist".
Both is not the truth, because an ODBC-connection on the
same computer to the same server and database works fine.
My first idea was a wrong MDAC version. But now I replaced
"MDAC 2.7 Refresh" with "MDAC 2.7 SP1 Refresh" and the result is still the same. Additional on some other computers the same program does work absolut fine. Do I have to go through the whole registry to remove all entries
from MDAC or does anyone have a good idea?
Set dbCCC = New ADODB.Connection
dbCCC.CommandTimeout = 100
dbCCC.CursorLocation = adUseClient
dbCCC.ConnectionString = "Provider=SQLOLEDB;Server=" & dbServer & ";Database=" & sDatabase
If bTrusted Then
dbCCC.Open "Provider=SQLOLEDB;Trusted_Connection=yes;Server=" & dbServer & ";Database=" & sDatabase
Else
dbCCC.Open "Provider=SQLOLEDB;Server=" & dbServer & ";Database=" & sDatabase, sUsername, sPassword
End If
I have a small VB 6.0 application using MDAC to communicate with a SQL-Server. The lines below
set up the connection. Now on some computers the
dbccc.open results in an "unknown error" with
"server does not exist" or "database xy does not exist".
Both is not the truth, because an ODBC-connection on the
same computer to the same server and database works fine.
My first idea was a wrong MDAC version. But now I replaced
"MDAC 2.7 Refresh" with "MDAC 2.7 SP1 Refresh" and the result is still the same. Additional on some other computers the same program does work absolut fine. Do I have to go through the whole registry to remove all entries
from MDAC or does anyone have a good idea?
Set dbCCC = New ADODB.Connection
dbCCC.CommandTimeout = 100
dbCCC.CursorLocation = adUseClient
dbCCC.ConnectionString = "Provider=SQLOLEDB;Server=" & dbServer & ";Database=" & sDatabase
If bTrusted Then
dbCCC.Open "Provider=SQLOLEDB;Trusted_Connection=yes;Server=" & dbServer & ";Database=" & sDatabase
Else
dbCCC.Open "Provider=SQLOLEDB;Server=" & dbServer & ";Database=" & sDatabase, sUsername, sPassword
End If