我想SQL不会有错的,我在其他机子上能用.下面是我的原码,请多多指教 谢谢!!!
<!--#include file="conn.asp"-->
<%
dim mysql
dim banming,banren,nian,yue,ri,zhuangtai,banzhuren,dianhua
banming=request.form("banming")
banren=request.form("banren")
nian=request.form("nian")
yue=request.form("yue")
ri=request.form("ri")
zhuangtai=request.form("zhuangtai")
banzhuren=request.form("banzhuren")
dianhua=request.form("dianhua")
if banming="" or banren="" then
response.write "<script language=javascript>history.back();alert('请输入完整的数据');</script>"
db.close
set db=nothing
response.end
end if
if banzhuren="" then
banzhuren="暂无"
end if
if dianhua="" then
dianhua="无"
end if
banren=cint(banren)
ruxue=nian & "-" & yue & "-" & ri
ruxue=cdate(ruxue)
mysql="insert into ban(banming,banren,ruxue,zhuangtai,banzhuren,dianhua) values('"& banming&"','"&banren&"','"&ruxue&"','"&zhuangtai&"','"&banzhuren &"','"&dianhua &"')"
db.execute(mysql)
db.close
set db=nothing
%>
<center>班级登记成功