<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
option explicit
dim conn,db,rs,sql,sgren,sgtime,sgphone,sgzhuti,sgzhuangtai,zaphone,zatime,fenleid,fenleix
dim sgneirong
db="/mdb/login.mdb"
sgren=Session("username")
sgtime=request.form("sgtime")
sgphone=Session("uphone")
sgzhuti=request.form("textzhuti")
sgneirong=request.form("textneirong")
sgneirong=replace(sgneirong,chr(13),"<br>")'替换回车
sgneirong=replace(sgneirong," "," ")'替换空格
sgzhuangtai=request.form("sgzhuangtai")
zaphone=request.form("zaphone")
zatime=request.form("zatime")
fenleid=request.form("feileid")
fenleix=request.form("feileix")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
sql="select * from shengao1 where zhuti='"&sgzhuti&"'"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,2
if not rs.eof then
%>
<style type="text/css">
<!--
.style1 {
font-family: "宋体";
font-size: 10pt;
}
.style2 {color: #FF0000}
body {
background-image: url(../../../img/beijing.gif);
}
-->
</style>
<span class="style1">对不起,您所发布申告的主题重复,请检查是否重复或者修改主题!
<%
else
rs.addnew
rs("name")=sgren
rs("phone")=sgphone
rs("zhuti")=sgzhuti
rs("miaoshu")=sgneirong
rs("date_time")=sgtime
rs("xulie")=sgzhuangtai
rs("gonghao")=Session("user")
rs("zaphone")=zaphone
rs("zatime")=zatime
rs("fenleid")=fenleid
rs("fenleix")=fenleix
rs.update
%>
<%
end if
rs.close
conn.close
set conn=nothing
%>
</p>
</span>
<p>
<span class="style1">障碍:<span class="style2"><%=sgzhuti%></span>添加成功,请<a href="../../../loginok.asp">返回主页</a>!</span>
</p>
他总是提示我字段shengao1.miaoshu不能是零长度的字符串
是不是我那里写的有问题啊??
昨天还可以用呢