asp到底他妈的怎么链接数据库?

telankes2000 2014-04-18 11:02:04
ADODB.Field 错误 '80020009'

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


<% if action = "0" or action = "1" then '如果是新增修改%>
<%
'if uid <>"" then
cmdText = cmdText & "where User_id = '"&uid&"'"
connopen
set rs = conn.execute(cmdText)
' if rs.EOF then
' response.write "用户不存在!"
'response.end
' conn.close
' end if

' end if
%>

...全文
295 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
你要判断下是否有记录,没有记录你进行读操作当然出错了 <% if action = "0" or action = "1" then '如果是新增修改%> <% 'if uid <>"" then cmdText = cmdText & "where User_id = '"&uid&"'" connopen set rs = conn.execute(cmdText) if rs.EOF or rs.bof then 'response.write "用户不存在!" response.end conn.close end if ' end if %>

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧