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

Error Type: (0x80020009) Exception Occured

Status
Not open for further replies.

ramellion

Programmer
Joined
Jun 10, 2004
Messages
3
Location
US
Hey,
I have this error message when I try to launch my ASP page:

Error Type:
(0x80020009)
Exception occurred.
/First/test1.asp, line 64


here is my code:
<%
Dim rs
Set rs = Server.CreateObject ("ADODB.Recordset")
rs.Open "tres2", "DSN=test"
While Not rs.EOF
Response.Write ("<tr>")
Response.Write ("<td height='30' width='24%'>" & "<b>" & "<font size='2' color='C10000'>" & rs("TENOR") & "</b>" & "</td>")
Response.Write ("<td height='30' width='12%'>" & "<b>" & "<font size='2' color='C10000'>" & rs("USD") & "</b>" & "</td>")
response.write ("<td height='30' width='12%'>" & "<b>" & "<font size='2' color='C10000'>" & rs("CAD") & "</b>" & "</td>")
Response.Write ("<td height='30' width='12%'>" & "<b>" & "<font size='2' color='C10000'>" & rs("EUR") & "</b>" & "</td>")
Response.Write ("<td height='30' width='12%'>" & "<b>" & "<font size='2' color='C10000'>" & rs("GBP") & "</b>" & "</td>")
Response.Write ("<td height='30' width='12%'>" & "<b>" & "<font size='2' color='C10000'>" & rs("CHF") & "</b>" & "</td>")
Response.Write ("<td height='30' width='12%'>" & "<b>" & "<font size='2' color='C10000'>" & rs("JPY") & "</b>" & "</td>")

Response.Write ("</tr>")

rs.MoveNext

Wend
Response.Write ("<tr>")
Response.Write ("<td height='42' width='96%' colspan='7'>" & "<b>" & "<font size='2' color='C10000'>" & rs("QUOTE") & "</b>" & "</td>")
Response.Write ("</tr>")
rs.Close
Set rs = Nothing

%>

Can you please help me?
 
Can you please clarify what is on line 64?

Also, what is "tres2" that you are using when you open your recordset?

------------------------------------------------------------------------------------------------------------------------
"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair."
--Dou
 
Line 64 is:
Response.Write ("<td height='42' width='96%' colspan='7'>" & "<b>" & "<font size='2' color='C10000'>" & rs("QUOTE") & "</b>" & "</td>")

"Tres2" is the table name in my database.
 

rs.MoveNext << moving thru records

Wend << looping statement

-------->>> REACHED END OF RECORDS <<<-------

Response.Write ("<tr>")
Response.Write ("<td height='42' width='96%' colspan='7'>" & "<b>" & "<font size='2' color='C10000'>" & rs("QUOTE") & "</b>" & "</td>") <<<--- Exceeding the end of recordset, hence error


[thumbsup2]DreX
aKa - Robert
 
By the time you reach that line, you have already looped all the way to the end of the recordset and therefore rs("QUOTE") won't exist. You would need to move back to the beginning of your recordset before you attempt to create that row in your table or move that line within your while/wend statement. Or, if that is supposed to be a summation, create the sum variable within your loop and then just reference that sum variable.

Also, are you actually able to retrieve your recordset just by using the table name? I've never come across such syntax... Normally, I would use "SELECT * FROM tres2".

------------------------------------------------------------------------------------------------------------------------
"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair."
--Dou
 
Yeah! I can retrieve my recordset just by using that syntax. It's easier for me and less complex. Thanks guys for the tips, I'll try them
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top