p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Databases (http://p2p.wrox.com/forumdisplay.php?f=62)
-   -   How can I trap for a connection error (http://p2p.wrox.com/showthread.php?t=12295)

cdukes77@bellsouth.net April 26th, 2004 12:36 PM

How can I trap for a connection error
I am trying to find a way to trap for a connection error (so that I can take a different path in the event of said error)

My handy dandy book says that ... objRS.Errors.Count ... should provide me with a way to discover if a connection has failed ... but I get an error saying that "Object doesn't support this property or method" ...

Anyone ever need to do this ... how did you go about it?

Chip Dukes

pgtips April 27th, 2004 03:09 AM

I usually check the State property of the Connection object. If its adStateOpen (=1) then all is fine.

BTW the Errors collection is part of the connection object not the recordset object.


All times are GMT -4. The time now is 09:30 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.