ADODB.Recordset (0x800A0BB9) 错误
<%dim sql,student_id,student_name,age,sex,in_time,homeplace,major
student_id=Trim(Request.Form("student_id"))
student_name=Trim(Request.Form("student_name"))
sex=Trim(Request.Form("sex"))
age=Trim(Request.Form("age"))
in_time=Trim(Request.Form("in_time"))
homeplace=Trim(Request.Form("homeplace"))
major=Trim(Request.Form("major"))
set urs=Server.CreateObject("ADODB.Recordset")
sql="select student_id,student_name,sex,age,in_time,homeplace,major from student where student_name='"&student_name&"'"
urs.open sql,conn,1,3
if not rs.eof then
response.Write"<script> alert('此学生已存在.')</script>;history.back();"
response.End
else
set rs="nothing"
set rs=Server.CreateObject("ADODB.Recordset")
sql="Selcet student_id,student_name,sex,age,in_time,homeplace,major from student"
urs.open sql,conn,1,3// 第 12 行
urs.addnew
urs("student_id")=student_id
urs("student_name")=student_name
urs("sex")=sex
urs("in_time")=in_time
urs("homeplace")=homeplace
urs("major")=major
urs.update
urs.close
set urs=nothing
end if
set urs=nothing
response.Write "<script language=javascript>{window.alert('记录添加成功!请点击“确定”');window.location.href='add_student.asp';}</script>"
%>
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/biyesheji/admin/save.asp, 第 12 行