Ok, here's a strange one. I am trying to debug a DLL on our new test server (let's not go into the fact that there was never a test server shall we?!!)
I am getting this error:
-2147467259 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
When the following code is run in the DLL
--------------------------------------------
Dim cn As New ADODB.Connection
strDSN = "DSN=Engine"
strUser = "username" 'not the real user name
strPassword = "password" 'that's not really the password, you know that right? ;)
'ERROR HAPPENS HERE!
cn.Open strDSN, strUser, strPassword
--------------------------------------------
The strange think is, if I copy this code into a new VB exe and run it, in runs fine. I have the ODBC setup (yes, the ADO is running through ODBC... I didnt write this!)
Question
James Rose
Ok, here's a strange one. I am trying to debug a DLL on our new test server (let's not go into the fact that there was never a test server shall we?!!)
I am getting this error:
-2147467259 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
When the following code is run in the DLL
--------------------------------------------
Dim cn As New ADODB.Connection
strDSN = "DSN=Engine"
strUser = "username" 'not the real user name
strPassword = "password" 'that's not really the password, you know that right? ;)
'ERROR HAPPENS HERE!
cn.Open strDSN, strUser, strPassword
--------------------------------------------
The strange think is, if I copy this code into a new VB exe and run it, in runs fine. I have the ODBC setup (yes, the ADO is running through ODBC... I didnt write this!)
Any thoughts?
Link to comment
Share on other sites
5 answers to this question
Recommended Posts