PDA

Click to See Complete Forum and Search --> : Trapping errors on ADODB open...


Andrew Herrmann
Apr 2nd, 2000, 10:08 PM
When I try to open up a database specifying an invalid server name, the following error information is generated:

Err.Number: (-2147467259)
Err.Description: [TCX][MyODBC]Can't connect to MySQL server on 'localhost' (10061)

I'd like to be able to inform the user that the server was invalid. I suppose I could trap error number -2147467259 or look for "Can't connect" in the error description, but I figure that there must be a clean way (a return value or some neat function) to detect problems with my connect string.

Thanks..