Wrox Programmer Forums
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 26th, 2004, 12:36 PM
Registered User
Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

Old April 27th, 2004, 03:09 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post

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.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help to trap errors starnet SQL Server 2000 1 October 6th, 2006 11:05 AM
Trap error on Jpeg Image - unsafe array echovue Classic ASP Professional 2 April 24th, 2006 11:47 PM
GetObject Trap bostek VBScript 2 November 24th, 2004 02:39 AM
Disable/Trap msgBox?? adelgado Access VBA 1 September 13th, 2004 03:54 PM
Error displayed with error trap code stoneman Access 4 February 28th, 2004 02:53 PM

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