Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP 0115 error

Status
Not open for further replies.

budmor

MIS
Nov 9, 1999
16
0
0
CH
Hi,

I'm getting the error below intermittently. The trouble is this script works fine for a period of time but then crashes out. I'm using my W2K Professional as the IIS 5.0 server. If I reboot it will work again for a while. I have a number of other Form/Response scripts that yield the same error when the are run subsequently. I checked TechNet which recommended adding an On Error Resume Next to the 500-100.asp but this didn't do anything. There are a number of articles on the ASP 0115 error but none seem to be relevant.

I'm new to ASP so any help would be greatly appreciated.

My code appears below - line 18 is :

Set oRSp=server.createobject("ADODB.recordset")

Regards,

Budmor

Error:


Active Server Pages error 'ASP 0115'

Unexpected error

/iisHelp/common/500-100.asp

A trappable error (C0000005) occurred in an external object. The script cannot continue running.

Microsoft VBScript runtime error '800a01fb'

An exception occurred: 'createobject'

/web/OpenPO_NumbersResponse.asp, line 18

Code:<html>

<head>
<title>Here are the results of your query</title>

<meta name=&quot;Microsoft Theme&quot; content=&quot;tilt 011, default&quot;>
</head>

<body background=&quot;../_themes/tilt/tlbkgnd.jpg&quot; bgcolor=&quot;#FFFFFF&quot; text=&quot;#330099&quot; link=&quot;#CC00CC&quot; vlink=&quot;#000066&quot; alink=&quot;#666699&quot;><!--mstheme--><font face=&quot;Verdana, Arial, Helvetica&quot;>

<p><font size=&quot;3&quot; color=&quot;green&quot;>Closed PO Numbers by Line Number</font></p>

<%
varPONUMBER = request.form(&quot;PONUMBER&quot;)

dim oRSp
Set oRSp=server.createobject(&quot;ADODB.recordset&quot;)

txtSQL = &quot;SELECT PODB.PO_LINE.PART_NUMBER ,&quot;
txtSQL = txtSQL &amp; &quot; PODB.PO_LINE.STATUS_HPPO,&quot;
txtSQL = txtSQL &amp; &quot; PODB.PO_LINE.QTY_ORD_PO,&quot;
txtSQL = txtSQL &amp; &quot; PODB.PO_LINE.PO_LINE_NO&quot;
txtSQL = txtSQL &amp; &quot; FROM PODB.PO_LINE&quot;
txtSQL = txtSQL &amp; &quot; WHERE ( PODB.PO_LINE.PO_NUMBER = '&quot; &amp; varPONUMBER &amp; &quot;' ) AND &quot;
txtSQL = txtSQL &amp; &quot; ( PODB.PO_LINE.QTY_REC = 0 )&quot;

oRSp.open txtSQL, &quot;dsn=MMDB&quot;,1

oRSp.moveFirst


Response.Write &quot;<TABLE BORDER=1><TR>&quot;

Response.Write &quot;<th>Part Number</th>&quot;
Response.Write &quot;<th>Status</th>&quot;
Response.Write &quot;<th>Quantity Ordered</th>&quot;
Response.Write &quot;<th>Line No.</th>&quot;

Response.Write &quot;</TR><TR><TD>&quot;
Response.Write oRSp.GetString(,,&quot;</TD><TD ALIGN=CENTER>&quot;,&quot;</TD></TR><TR><TD ALIGN=CENTER>&quot;,&quot;-unknown-&quot;)
Response.Write &quot;</TD></TR></TABLE>&quot;

oRSp.Close
Set oRSp=nothing

%>
<!--mstheme--></font></body>
</html>


 
try to fetch the recordset this way:

Set conn = Server.createObject(&quot;Adodb.connection&quot;)
conn.open &quot;DSN=MMDB&quot;
Set oRSp=conn.execute (txtSQL)
... Silvers5
As seen on EE
 
Thanks Silvers5,

I have adjusted the code as recommended and it works fine this way too. I have not experienced a crash since I posted the error, however I will keep an eye on things! On further reflection I was just wondering if this error could have anything to do with the provider - I use ODBCLink/SE ODBC driver from M.B. Foster to connect to an IMAGE/SQL database on an HP3000? Could it be a limitation of the connection properties which are dependent on the database, driver or provider?

Regards,

Budmor.
 
no it's just that you didn't define and open a connection for the recordset! you should do it before openening a recordset, you only supplied the connection string..

rgrds

don't forget to close and clean at the end

rs.close:set rs=nothing
cn.close: set cn=nothing

where cn is the connection and rs the recordset Silvers5
As seen on EE
 
Also check that you have the latest version of the scripting engine! Vbscript.dll 5.0 may be the cause. We're having the same errors with 5.0 but not on a systems where vbscript 5.1 was installed. See msdn.microsoft.com/scripting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top