当前位置: 代码迷 >> ASP >> BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要当前的记录
  详细解决方案

BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要当前的记录

热度:496   发布时间:2012-03-20 14:01:11.0
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
不是BUG。。装了补丁也没用。
应该是代码有问题
代码如下,各位给看看。

<%@LANGUAGE= "VBSCRIPT "   CODEPAGE= "936 "%>
<%if   not   session( "isbmd ")= "yes "   then  
response.Redirect   "Login.htm "
 
else
%>
<%   dim   sdate,scarno
      sdate=Request.QueryString( "date ")
      scarno=Request.QueryString( "techCarno ")
     
%>
<!--#include   file= "conn.asp "-->

<%
if   request( "action ")= "update "   then
id=request( "id ")
'if   not   rs.eof   then
set   rs=server.createobject( "adodb.recordset ")
sqltext= "select   *   from   [date]   where   [date]= ' "&   sdate   & " '   and   techCarno= ' "&   scarno   & " ' "
rs.open   sqltext,conn,3,3
rs( "time1 ")=request.form( "time1 ")
rs( "time2 ")=request.Form( "time2 ")
rs( "time3 ")=request.Form( "time3 ")
rs( "time4 ")=request.Form( "time4 ")
rs( "time5 ")=request.Form( "time5 ")
rs( "time6 ")=request.Form( "time6 ")
rs( "time7 ")=request.Form( "time7 ")
rs( "time8 ")=request.Form( "time8 ")
rs( "time9 ")=request.Form( "time9 ")
rs( "time10 ")=request.Form( "time10 ")
'end   if
rs.update
rs.close
conn.close
response.redirect   "timeedit.asp "
else
id=request( "id ")
set   rs=server.createobject( "adodb.recordset ")
sqltext= "select   *   from   [date]   where   ID= "&id
rs.open   sqltext,conn,1,1


end   if
%>
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.01   Transitional//EN "   "http://www.w3.org/TR/html4/loose.dtd ">
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<title> 报名点约车修改 </title>
</head>
<SCRIPT   language=javascript   id=clientEventHandlersJS>
<!--

function   form1_onsubmit()  
{
if(document.form1.name1.value.length <1)
  {
      alert( "   约车人项目不能为空,若未约填写“未约”! ");
      document.form1.name1.focus();
      return   false;
  }
}

//-->
</SCRIPT>

<body>
<form   name= "form1 "   method= "post "   action= "edit.asp "   onSubmit= "return   form1_onsubmit(); ">  
<input   type=hidden   name=action   value= "update ">
<table   width= "389 "   border= "1 "   align= "center ">
    <tr   align= "center ">
        <td   colspan= "2 "> 约车信息修改 </td>
        </tr>
    <tr>
        <td> 车号: </td>
        <td> <%=rs( "techCarno ")%> </td>
  相关解决方案