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 SkipVought 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 occurred.

Status
Not open for further replies.

crmpicco

Programmer
Nov 29, 2004
66
0
0
GB
Error Type:
(0x80020009)
Exception occurred.
/Trial/dbase_admin/asp/display_fare_search_act.asp, line 79

Why cant this work?

Line 79:

<% if rs1("status") <> "" then %>


<!-- #Include file="connection.asp"-->
<%
company_id = trim(request.form("company_id"))
'air_cds = trim(request.form("air_cds"))
air_cds = trim(request.form("air_cds"))

'response.write "Company ID = " & company_id & "<br>"
'response.write "Airline = " & air_cds & "<br>"
'response.write company_id2

Session("company_id") = company_id
' response.write Session("company_id")
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Display Fare Search</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>a.{text-decoration:none}</style>
<script language="javascript">


</script>
</head>

<body bgcolor="#F5F5F5">

<form name="form" method="post" action="/Trial/dbase_admin/asp/display_fare_search2.asp">
<table width="800" border="0" bordercolor="#ECECEC" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="16"><img src="../images/top_lefbb.gif" width="16" height="16"></td>
<td height="16" background="../images/top_midbb.gif"><img src="../images/top_midbb.gif" width="16" height="16"></td>
<td width="24"><img src="../images/top_rigbb.gif" width="24" height="16"></td>
</tr>
<tr>
<td width="16" background="../images/cen_lef.gif"><img src="../images/cen_lef.gif" width="16" height="11"></td>
<td>
<Table width="100%" border="0" bordercolor="#ECECEC" align="center" cellpadding="0" cellspacing="0">
<%
set rs=Con.Execute("select * from contract where company_id = '"& company_id &"' and air_cds like '%"& air_cds &"%' ")
set rs1=Con.Execute("select * from contract where company_id = '"& company_id &"' and air_cds like '%"& air_cds &"%' and contract_id = '"& contract_id &"'")
if not rs.eof then
%>


<tr bgcolor="#CCCCCC">
<td colspan="5" align="center">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Search Result</b></font>
</td>
</tr>
<tr bgcolor="#ECECEC">
<td width="14%" align="center">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Contract ID</b></font>
</td>
<td width="25%" align="center">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Status</b></font>
</td>
<td width="20%" align="center">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Airline</b></font>
</td>
<td width="41%" align="center">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Contract Title</b></font>
</td>
</tr>
<%
'response.Write ("select * from net_fares where company_id = '"& company_id &"' and air_cd = '"& air_cds &"' and contract_id = '"& contract_id &"'")
'response.Write rs1("status")
%>
<%
while not rs.eof
if rs("deleted") <> "Yes" then
%>

<tr bgcolor="#ECECEC">
<td align="center">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="/Trial/dbase_admin/asp/display_fare_search2.asp?air_cds=<%=rs("air_cds")%>&contract_id=<%=rs("contract_id")%>&contract_title=<%=rs("contract_title")%>"><%=rs("contract_id")%></a></font>
</td>
<% if rs1("status") <> "" then %>
<td align="center">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=rs1("status")%></font>
</td>
<% end if %>
<td align="center">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=rs("air_cds")%></font>
</td>
<td align="center">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=rs("contract_title")%></font>
</td>
</tr>
<%
'response.Write rs("contract_id")
%>

<%
end if
rs.movenext
wend
else
%>

<tr bgcolor="#ECECEC">
<td colspan="12" align="center"><font face="verdana" size="2" color="red">
<B><br>Sorry, <br>there are no results to match your Criteria<br><br></b></font></td></tr>
<%
end if
%>

<tr bgcolor="#ECECEC">
<td colspan="5">&nbsp;</td>
</tr>
<tr bgcolor="#ECECEC">
<td align="center" colspan="5">
<input type="button" name="back" value="Back" onMouseOver="style.cursor='hand'" onClick="history.back()">
</td>
</tr>
</table>
</td>
<td width="24" background="../images/cen_rigBB.gif" bgcolor="#ECECEC"><img src="../images/cen_rigBB.gif" width="24" height="11"></td>
</tr>
<tr bgcolor="#ECECEC">
<td width="16" height="16"><img src="../images/bot_lefbb.gif" width="16" height="16"></td>
<td height="16" bgcolor="#ECECEC" background="../images/bot_midbb.gif"><img src="../images/bot_midbb.gif" width="16" height="16"></td>
<td width="24" height="16" bgcolor="#ECECEC"><img src="../images/bot_rigbb.gif" width="24" height="16"></td>
</tr>
</table>
</form>
</body>
</html>
 
I don't see the problem at a glance (putting your code inside [ignore]
Code:
 and
[/ignore] tags here would make it much easier to read, as would eliminating all the commented-out stuff), but it's clear that while you test for rs.eof, you never test for rs1.eof: you just assume there's something in the recordset. That might have something to do with it.
 
<% if rs1("status") <> "" then %>


<!-- #Include file="connection.asp"-->
i think this line needs to be above the if rs1
as it cannot find connection
 
I have had the same error. It was because I was trying to do recordset actions on an empty recordset. By putting an --if rs1.recordcount >0 then -- after you open the recordset and the end if before your clean up code you can process the page error free.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top