|
 |
access_asp thread: ADO Access error trapping
Message #1 by "Aaron Vegh" <aaron.vegh@c...> on Wed, 10 Apr 2002 21:20:25
|
|
Hi there,
I'm forced to use Access to serve a database for a large-ish site.
Predicably, we're getting server errors that look like this:
Microsoft OLE DB
> Provider for ODBC Drivers error '8007000e' , ,
> [Microsoft][ODBC Microsoft Access Driver] System resource
> exceeded. , ,
> /foo.asp, line 441
Line 441 in this reference is the last line of this bit of code:
SqlJunk = "SELECT * from content where item_id="&id&" order by
subcategory"
Set rsGlobalWeb = Server.CreateObject("ADODB.Recordset")
rsGlobalWeb.Open SqlJunk, dbGlobalWeb, 3
So my question is, how would I trap that last line, check it for a
returned error and take alternative action in that case?
Thanks for your help!
Aaron.
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 11 Apr 2002 10:24:08 +1000
|
|
Aaron,
What is "dbGlobalWeb"? Is it a connection object? or a connection string?
(insert <rant> about using appropriate naming convention for objects/strings
etc)
Also why are you using "magic numbers" in your RS.Open method call? Use
named constants instead.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Aaron Vegh" <aaron.vegh@c...>
Subject: [access_asp] ADO Access error trapping
: Hi there,
: I'm forced to use Access to serve a database for a large-ish site.
: Predicably, we're getting server errors that look like this:
:
: Microsoft OLE DB
: > Provider for ODBC Drivers error '8007000e' , ,
: > [Microsoft][ODBC Microsoft Access Driver] System resource
: > exceeded. , ,
: > /foo.asp, line 441
:
: Line 441 in this reference is the last line of this bit of code:
:
: SqlJunk = "SELECT * from content where item_id="&id&" order by
: subcategory"
: Set rsGlobalWeb = Server.CreateObject("ADODB.Recordset")
: rsGlobalWeb.Open SqlJunk, dbGlobalWeb, 3
:
: So my question is, how would I trap that last line, check it for a
: returned error and take alternative action in that case?
.
|
|
 |