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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exception occured. 1

Status
Not open for further replies.

discusmania

IS-IT--Management
Oct 24, 2000
158
AP
what does it mean by this error?

error '80020009'
Exception occurred.

/dept/amt/software/testproaction/averagetime.asp, line 59


thanks and regards
Nor

 
Hard to tell when you don't show the code :). I don't think any of us knows all the error codes ASP can throw. Show some code, and we'll find you a solution.


<webguru>iqof188</webguru>
 
here the code, i'm sorry, it's a bit messy


<html>
<head>
</head>
<body>
<div align=&quot;center&quot;>

<%
dim workweek


set rs = Server.CreateObject(&quot;ADODB.Connection&quot;)

'setting the recordset
set results=Server.CreateObject(&quot;ADODB.Recordset&quot;)
'set results2=Server.CreateObject(&quot;ADODB.Recordset&quot;)

cn = &quot;Provider=MSDAORA;&quot;&_
&quot;Data Source=(Description=(Address=(Protocol=TCP)&quot;&_
&quot;(host=145.7.2.54)&quot;&_
&quot;(port=1521))&quot;&_
&quot;(CONNECT_DATA=(SID=WRSMQS)));&quot;&_
&quot;User ID=MDAMQS;&quot;&_
&quot;Password=waris&quot;

'select from table prolist all data which the status is close and date close is not null
strSQL=&quot;select date_close, date_enter, pro_ctgry from prolist where rej_stat='Closed' and date_close is not null and date_enter is not null and date_enter<=date_close order by date_close asc&quot;

'strSQL2=&quot;select count(*) as totalrecords from AISTEST where rej_stat='Closed' and date_close is not null&quot;

rs.Open cn

results.Open strSQL,rs,1,2

' initiate variable
dtcount=0
qcount=0
ecount=0
mcount=0
ncount=0
do until results.eof
select case results(&quot;pro_ctgry&quot;)
case &quot;DownTime&quot;
response.write strsql
workweek=cint(DateDiff(&quot;ww&quot;,#30-12-2000#,(results(&quot;date_close&quot;)),1,1))
select case workweek
case &quot;12&quot;

dedt12=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acdedt12=acdedt12+dedt12
dtcount12=dtcount12+1
case &quot;13&quot;
dedt13=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acdedt13=acdedt13+dedt13
dtcount13=dtcount13+1
case &quot;14&quot;
dedt14=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acdedt14=acdedt14+dedt14
dtcount14=dtcount14+1
end select
case &quot;QualityMfg&quot;
workweek=cint(DateDiff(&quot;ww&quot;,#30-12-2000#,(results(&quot;date_close&quot;)),1,1))
select case workweek
case &quot;12&quot;
deq12=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acdeq12=acdeq12+deq12
qcount12=qcount12+1
case &quot;13&quot;
deq13=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acdeq13=acdeq13+deq13
qcount13=qcount13+1
case &quot;14&quot;
deq14=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acdeq14=acdeq14+deq14
qcount14=qcount14+1
end select
case &quot;NPI/NPR&quot;
workweek=cint(DateDiff(&quot;ww&quot;,#30-12-2000#,(results(&quot;date_close&quot;)),1,1))
select case workweek
case &quot;12&quot;
den12=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acden12=acden12+den12
ncount12=ncount12+1
case &quot;13&quot;
den13=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acden13=acden13+den13
ncount13=ncount13+1
case &quot;14&quot;
den14=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acden14=acden14+den14
ncount14=ncount14+1
end select
case &quot;Entitlement&quot;
workweek=cint(DateDiff(&quot;ww&quot;,#30-12-2000#,(results(&quot;date_close&quot;)),1,1))
select case workweek
case &quot;12&quot;
dee12=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acdee12=acdee12+dee12
ecount12=ecount12+1
case &quot;13&quot;
dee13=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acdee13=acdee13+dee13
ecount13=ecount13+1
case &quot;14&quot;
dee14=trim(results(&quot;date_close&quot;)-results(&quot;date_enter&quot;))+1
acdee14=acdee14+dee14
ecount14=ecount14+1
end select
case &quot;Mischuck&quot;
dem=results(&quot;date_enter&quot;)
mcount=mcount+1


end select

results.movenext

loop %>




<H3><center> Average closing time by CoPs<center></H3>

<table border=1 bordercolor=&quot;green&quot;>
<tr><td>COP</td>
<td>WW12</td>
<td>WW13</td>
<td>WW14</td>
<tr>
<td>DownTime</td>
<td>
<%=formatnumber(acdedt12/dtcount12,1)%></td>
<td>
<%=formatnumber(acdedt13/dtcount13,1)%></td>
<td>
<% if acdedt14=0 or dtcount14=0 then %>
<font color=&quot;white&quot;>null</font>
<% else %>
<%=formatnumber(acdedt14/dtcount14,1)%>
<%end if %></td>
</tr>
<tr>
<td>Quality</td><td>
<%=formatnumber(acdeq12/qcount12,1)%></td>
<td>
<%=formatnumber(acdeq13/qcount13,1)%></td>
<td>
<% if acdeq14=0 or qcount14=0 then %>
<font color=&quot;white&quot;>null</font>
<% else %>
<%=formatnumber(acdeq14/qcount14,1)%>
<%end if %></td>
</tr>
<tr>
<td>NPI/NPR</td>
<td>
<% if acden12=0 or ncount12=0 then %>
<font color=&quot;white&quot;>null</font>
<% else %>
<%=formatnumber(acden12/ncount12,1)%>
<%end if %></td>
<td>
<% if acden13=0 or ncount13=0 then %>
<font color=&quot;white&quot;>null</font>
<% else %>
<%=formatnumber(acden13/ncount13,1)%>
<%end if %></td>
<td>
<% if acden14=0 or ncount14=0 then %>
<font color=&quot;white&quot;>null</font>
<% else %>
<%=formatnumber(acden14/ncount14,1)%>
<%end if %></td>
</tr>


<tr>
<td>Mischuck</td>
<td>
<% if acdem12=0 or mcount12=0 then %>
<font color=&quot;white&quot;>null</font>
<% else %>
<%=formatnumber(acdem12/mcount12,1)%>
<%end if %></td>
<td>
<% if acdem13=0 or mcount13=0 then %>
<font color=&quot;white&quot;>null</font>
<% else %>
<%=formatnumber(acdem13/mcount13,1)%>
<%end if %></td>
<td>
<% if acdem14=0 or mcount14=0 then %>
<font color=&quot;white&quot;>null</font>
<% else %>
<%=formatnumber(acdem14/mcount14,1)%>
<%end if %></td>
</tr>


<tr>
<td>Entitlement</td>
<td>
<% if acdee12=0 or ecount12=0 then %>
<font color=&quot;white&quot;>null</font>
<% else %>
<%=formatnumber(acdee12/ecount12,1)%>
<%end if %></td>
<td>
<% if acdee13=0 or ecount13=0 then %>
<font color=&quot;white&quot;>null</font>
<% else %>
<%=formatnumber(acdee13/ecount13,1)%>
<%end if %></td>
<td>
<% if acdee14=0 or ecount14=0 then %>
<font color=&quot;white&quot;>null</font>
<% else %>
<%=formatnumber(acdee14/ecount14,1)%>
<%end if %></td>
</tr>
</table>
</body>
</html>




 
discusmania, which line is 59? Please cut and paste that line in your next post -- this error usually means you are trying to access an array either above or below its upper or lower bound.

But if you point out what line is #59 (where the error got thrown), we could help. **Doesn't feel like counting**

:)
Paul Prewett
 
this is the error:

error '80020009'
Exception occurred.

/dept/amt/software/testproaction/averagetime.asp, line 35

and line 35 is:
workweek=cint(DateDiff(&quot;ww&quot;,#30-12-2000#,results(&quot;date_close&quot;)),1,1)


thanks for the help
 
hmm... do until results.eof --

try replacing that with
while not results.eof

and then, of course, instead of loop, you would replace that with

wend

I think you are at the eof, and it's doing it's last iteration of the loop, and it's at the eof, so there's no current record?? But I've always been a dunce at the difference between the whiles and do whiles -- I can explain it conceptually, but I just always use the while --

Or maybe there's a null value in one of the fields that's throwing the exception --

Whether or not either of these two is the actual culprit, I can guarantee you that it is something to do with the results(&quot;date_close&quot;) not being a value that it is expecting... hence the exception --

to help tracking it down, try putting a response.write(results(&quot;date_close&quot;)) right before that line -- then you can see the actual value that's causing the error --

hope it helps! :)
Paul Prewett
 
yes , i agree with u ,I also believe that the results(&quot;date_close&quot;) value is the cause. I try to reponse the write the results(&quot;date_close&quot;) and the list stop before the all the value come out giving the error:

Microsoft OLE DB Provider for Oracle error '80020009'

Errors occurred

?

but when paste the same SQL stament in SQL plus prompt: all the records come out and i can't find anything wrong with the records. What else could be wrong?

Thanks a lot for the help.


 
Ok, so it's bombing out on it's first run through the loop?

If so, put this right before the loop (humor me) --

if (results.eof and results.bof) then
response.write (&quot;I'm empty!&quot;)
else
response.write (&quot;I'm not empty! My first entry is &quot;)
response.write (results(&quot;date_close&quot;) & &quot;.&quot;)
end if

What does it tell you?
 
Ok, after re-reading your post, I was apparently off base up there asking about the empty recordset --

You say that many of the values do write out -- just that it throws the error before it's done --

So I'm gonna lean on the while not results.eof solution for now --

Maybe put a counter value in the response.write so you know what row it's occuring on (either that or output the results.absoluteposition) --

Then compare with the output in Oracle to see exactly what record it's bombing on --

let me know how it works out -
paul
 
Hmm... at last the problem solve.... thanks to u guys... it's actually the date_close is the cause, the data migration form excel spreadsheet to oracle db automatically change 27-MAR-01 to 3/27/0001 instead of 3/27/2001.

Thanks for the hints.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top