Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Website Programming Problem Design Solution
This is the forum to discuss the Wrox book ASP.NET 3.5 Website Programming Problem Design Solution by Chris Love; ISBN: 978-0-470-18758-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Website Programming Problem Design Solution section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 1st, 2011, 02:47 PM
Registered User
 
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy help me out

i have a issue in my code :

when i play a code so error shown :
Error Type:
ADODB.Field (0x80020009)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/PM/pm-comments-view.asp.

here is my code;
--------------------------------------------
<%@LANGUAGE="VBSCRIPT"%>

<!--#include file="checkLoggedIn.inc"-->
<!--#include file="connection.inc"-->
<%
dim varPageURL 'setting page name to check unauthorized access
varPageURL = "css-home.asp"
%>
<!--#include file="checkAccess.inc"-->
<!--#include file="checkMisc.inc"-->

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 12.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Project Manager</title>

<script language="javascript">
var elapsedTime = 0;
// set to the Session.Timeout value to notify users
// one minute after their Session times out.
var maxTime = (<%=Session.Timeout%> + 1) * 60;
var oneSecond;
oneSecond = window.setTimeout("timeoutCheck();",1000);
function timeoutCheck() {
elapsedTime = elapsedTime + 1;
if (elapsedTime > maxTime) {
window.location = "youTimedOut.htm";
}
else {
oneSecond = window.setTimeout("timeoutCheck();",1000);
}
}
</script>

<script language="JavaScript1.2" type="text/javascript" src="/navhead.js"></script>
<LINK
href="anycall_UK.css" rel=stylesheet type=text/css>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_valida teForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>
<script language="JavaScript1.2" type="text/javascript" src="/navh.js"></script>
<body bgcolor="#FFFFFF">
<div align="left">
<!--#include file="pageHead.htm"-->
</div>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" id="AutoNumber2">
<tr>
<td><img src="Images/bar-long-login.jpg" width="760" height="32"></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" id="AutoNumber3" height="189">
<tr>
<td width="126" bordercolor="#FF0000" bgcolor="#FFFFFF" height="184" align="left" valign="top">
<!--#include file="menu.inc"--> </td>
<td width="12" bordercolor="#FF0000" bgcolor="#FFFFFF" height="184" valign="top"></td>
<td width="622" bordercolor="#FF0000" bgcolor="#FFFFFF" valign="top">
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5" height="36">
<tr>
<td height="7" colspan="3"> <p align="right">... </td>
</tr>
<tr>
<td width="43%" height="18"> <b> Welcome <%=session("userName")%></b>
</td>
<td height="18" colspan="2"> <p align="right"> <font color="#800000">(User
Category -
<%
rspm.open "select Cat_Desc from pm_category where CatID = '" & session("UserCatID") & "'", con, 1,2
response.Write(rspm(0))
rspm.close
%>
)</font> </td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td colspan="5"><strong><PSUm><img src="Images/Separator.jpg"></psum></strong></td>
</tr>

<tr bgcolor="#FFFFCC">
<td colspan="5"><strong>New Comments Recieved</strong>
</td>
</tr>
<tr>
<td width="6%"><strong> PID</strong></td>
<td width="16%"><strong> Date</strong></td>
<td width="20%"><strong> Customer</strong></td>
<td width="42%"><strong> Status</strong></td>
<td width="16%"><strong> Sales User</strong></td>
</tr>
<%
dim rsComments
set rsComments = server.createObject("adodb.Recordset")

'MANAGEMENT AND SYSTEM ADMIN
if session("UserCatID") = 6 or session("UserCatID") = 5 or session("UserCatID") = 2 or session("UserCatID") = 3 or session("UserCatID") = 7 then
rsComments.open "select * from pm_Comments where p_id=0" & request.querystring("Status"),con,1,2

'rsComments.open "select * from pm_comments where p_id=0" & request.querystring("Status"),con,1,2

end if

'SALES PERSON
if session("UserCatID") = 1 then
rsComments.open "select * from pm_Comments where UserID='" & session("UserLoggedIn") & "' and p_id =" & request.querystring("Status"),con,1,2
end if

while not rsComments.eof
%>
<tr>
<td>
<%
response.write ("<a href='pm-edit-project.asp?PID=0" & rsComments("p_id") & "'>" & rsComments("p_id") & "</a>")
%>
</td>
<td>
<%
response.Write(rsComments("comment_date"))
%>
</td>
<td width="20%">
<%
rspm.open "select * from tblCustSup where CustSupID = '" & rscomments("UserID") & "'",con,1,2
response.Write(rspm("CustSupTitle"))
rspm.close
%>
</td>
<td>
<%
rspm.open "select p_status_desc from pm_status where p_status_code = " & rsProjects("p_status_code"),con,1,2
response.Write(rspm(0))
rspm.close
%>
</td>
<td>
<%
response.Write(rsProjects("UserID"))
%>
</td>
</tr>
<%
rsProjects.movenext
wend
rsProjects.close
%>
</table>
<p>&nbsp; </p>
</div></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" id="AutoNumber4">
<tr>
<td><img src="Images/Foot-world-large.jpg" width="760" height="77" border="0"></td>
</tr>
</table>

</body>

</html>
----------------------------------------------------------

please help me out









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.