dealing with ADO errors

Results 1 to 2 of 2

Thread: dealing with ADO errors

  1. #1
    Join Date
    Dec 1969

    Default dealing with ADO errors

    Hi there,<BR>I&#039;m forced to use Access to serve a database for a large-ish site. Predicably, we&#039;re getting server errors that look like this:<BR><BR>Microsoft OLE DB<BR>&#062; Provider for ODBC Drivers error &#039;8007000e&#039; , , <BR>&#062; [Microsoft][ODBC Microsoft Access Driver] System resource <BR>&#062; exceeded. , , <BR>&#062; /foo.asp, line 441<BR><BR>Line 441 in this reference is the last line of this bit of code:<BR><BR>SqlJunk = "SELECT * from content where item_id="&id&" order by subcategory" <BR>Set rsGlobalWeb = Server.CreateObject("ADODB.Recordset")<BR>rsGlobal Web.Open SqlJunk, dbGlobalWeb, 3<BR><BR>So my question is, how would I trap that last line, check it for a returned error and take alternative action in that case?<BR><BR>Thanks for your help!<BR>Aaron.

  2. #2
    Join Date
    Dec 1969

    Default RE: dealing with ADO errors

    all db errors are added to the Connection.Errors collection<BR><BR>ON ERROR RESUME NEXT<BR>Connection.Errors.Clear<BR>&#039;do some db stuff<BR><BR>If Connection.Errors.Count &#062; 0 then<BR> &#039;some error occured<BR> &#039;(use Connection.Errors.Number / Description for details)<BR>ELSE<BR> &#039;no probs<BR>END IF

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts