Catastrophic failure runtime error '-2147418113 (8000ffff)':

Very weird coz same application works on my machine but not on the targeted machine (winxp also - with sp1, while mine has service pack2)

I am trying to connect to a mysql database and I am not having any problems from my computer while I get this error message (see topic) when tested on other computer!

for connection I am using:

            With oConnection
                .ConnectionTimeout = 60 ' seconds
                .CommandTimeout = 5  'seconds
                .CursorLocation = adUseClient
                .Open "DSN=mySQLDB"
            End With

for recordset I use:

                Set rsClients = New ADODB.Recordset                
                rsClients.CursorType = adOpenKeyset
                rsClients.LockType = adLockBatchOptimistic
                rsClients.Open "SELECT * FROM Users", oConnection, , , adCmdText

remember this works on my comp, but not on target pc.

And I've installed MDAC 2.8 on target pc, so I don't know what the problem is!

Berhan KaragoezCreatorAsked:
Who is Participating?
cool12399Connect With a Mentor Commented:
Database connections must be made through either "system DSN's" (Data Source Names) or "File DSN's" and this is usually a result of an incorrectly formed DSN.

So, make sure you have a correct DSN set up, cn.Open "YOUR-DSN-NAME", etc. and it should work ok.
Berhan KaragoezCreatorAuthor Commented:
EH forgot to ask question :
How do I solve it?
p.s., that's probably what you forgot to do on your target machine, & you usually setup DSN's through the ODBC or equivalent panel.
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Berhan KaragoezCreatorAuthor Commented:
nope, odbc connection works from the other computer as well!

only my code fails on the other computer, it works from here as well.

But I'll try the system dsn connectiion, just because I haven't tried it.

Mind that DSN=mySQLDB exists on both computers and they point to an mysql database with ipnr and login/pass.

so the odbc connections work from BOTH computers.

The code to open a connection to database (on other computer fails and generates error message!

Berhan KaragoezCreatorAuthor Commented:
found it!

had to do with drivers!

please close question!
I was wondering what the specific solution was, if you remember.
Berhan KaragoezCreatorAuthor Commented:
Yes, it was the new odbc driver for mySQL causing the problem - an older version made it work perfectly!!

Berhan K.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.