注册 登录
编程论坛 ASP技术论坛

错误类型:Microsoft JET Database Engine (0x80040E10)

fengmnll 发布于 2010-05-22 14:45, 910 次点击
<!--#include file="conn.asp" -->
<%
      dim  sql,publish_id,publish_name
      publish_id=Request.Form("publish_id")
      publish_name=Trim(Request.Form("publish_name"))
      set rs=Server.CreateObject("ADODB.Recordset")
      sql="select * from publish where publish_name='"&publish_name&"'"
      rs.open sql,conn,1,3//是这行提示的错误
      if not rs.eof  then
             response.Write"<script> alert('此学生已存在.');history.back(edit_publish.asp);</script>"
             response.Redirect("edit_publish.asp")
             response.End
     else
            rs.addnew
            rs("publish_id")=publish_id
            rs("publish_name")=publish_name
            rs.update
            rs.close
            set rs=nothing
  end if
    response.write "<script language=jscript>alert(记录添加成功!');history.back(edit_publish.asp)</script>"
     response.Redirect("edit_publish.asp")
     response.End()  
%>
错误类型:
Microsoft JET Database Engine (0x80040E10)
至少一个参数没有被指定值。谢谢了
2 回复
#2
gupiao1752010-05-24 13:08
字段名写错,字段名不存在(数据库里没有这个字段),变量未定义,都可能导致参数未指定!
1