主题:无法向数据库中添加信息,有谁知道原因啊。
哪位帮我看看这面的这些代码哪些地方错了,为什么添加不了信息呢?
<%
dim action,str,rs,founderror,classname
action=Request("action")
classname=Request("bigclass")
if action="add" then
if classname="" then
founderror=true
Response.Write("<script language='javascript'>alert('栏目不能为空');</script>")
end if
if founderror<>true then
set rs=Server.CreateObject("Adodb.Recordset")
str="select * from class"
rs.addnew
rs("bigclass")=classname
rs("time")=Now()
rs.Update
call closeconn(conn)
call closers(rs)
end if
end if
%>
<%
dim action,str,rs,founderror,classname
action=Request("action")
classname=Request("bigclass")
if action="add" then
if classname="" then
founderror=true
Response.Write("<script language='javascript'>alert('栏目不能为空');</script>")
end if
if founderror<>true then
set rs=Server.CreateObject("Adodb.Recordset")
str="select * from class"
rs.addnew
rs("bigclass")=classname
rs("time")=Now()
rs.Update
call closeconn(conn)
call closers(rs)
end if
end if
%>