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

来源:百度知道 编辑:UC知道 时间:2024/06/08 01:38:43
admin.asp

<!--#INCLUDE FILE="login1.asp"-->
<!--#INCLUDE FILE="#econn1.asp"-->
<%
Set rs=Server.CreateObject("ADODB.recordset")
mysq="select * from admin where aduser='yulesoho'"

set rs=cn1.execute(mysq)
%>

<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>网管资料设置</title>
</head>

<body background="../images1/mybk3.jpg">
<p align="center"><font size="4" color="#FF0000">网管资料设置</font></p>

<form

数据库里一条信息都没有,肯定会出错了.

解决方法有两个:

一是;手动在数据库里加一条数据
二是:加一个判断语句

if not rs.eof then
执行语句
else
提示信息
end if