<!--#include file="strconnection.asp"-->
<!--#include file="session.asp"-->
<!--#include file="inc.asp"-->
<%
if request("action")="sava" then
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from haoshu"
rs.open sql,conn,3,3
rs.addnew
rs("shuming")=request("title")
rs("jieshao")=request("content")
rs("zuozhe")=request("author")
rs("tupian")=request("images")
rs.update
rs.close
response.Redirect("haoshutupianadd.asp")
end if
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="southidc.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.unnamed1 {
font-size: 12px;
color: #FFFFFF;
font-weight: bold;
}
-->
</style>
</head>
<body>
<script src=adminjs.js></script>
<script language="javascript">
function chk(){
document.all("content").value=IframeID.document.body.innerHTML;
if(document.form2.title.value==""){
alert("标题不能为空");
document.form2.title.focus();
return false;}
if(document.form2.author.value==""){
alert("作者不能为空");
document.form2.author.focus();
return false;}
if(IframeID.document.body.innerHTML==""){
alert("新闻内容不能为空");
IframeID.document.body.focus();
return false;}
return true;}
</Script>
<script Language="JavaScript">
<!--
function FormCheck()
{
if (document.form2.NNsort_name.value =="")
{
alert("请输入三级分类名称!");
document.form2.NNsort_name.focus();
return false;
}
if (document.form2.NNsort_title.value =="")
{
alert("请输入二级分类名称!");
document.form2.NNsort_title.focus();
return false;
}
}
function openwin(thelink,winName,features)
{
window.open(thelink,winName,features);
return (false);
}
//-->
</script>
<form action="haoshutupianadd.asp?action=sava&types=<%=types%>" method="post" name="form2" id="form2" onSubmit="return chk();">
<table width="772" border="0" align="center" cellpadding="2" cellspacing="2" class="table_southidc">
<tr>
<td height="22" colspan="2" align="center" bgcolor="6072A4" class="back_southidc"><font color="#FFFFFF"><strong><%=types%>添加</strong></font></td>
</tr>
<tr>
<td width="86" height="24" bgcolor="D6DFF9"><div align="left">书名:</div></td>
<td bgcolor="E7EDFC"><input name="title" type="text" id="title" size="30">
</td>
</tr>
<tr>
<td height="11" align="center" bgcolor="D6DFF9"> <div align="left">作者:</div></td>
<td height="11" align="center" bgcolor="E7EDFC"><div align="left">
<input name="author" type="text" id="author">
</div></td>
</tr>
<tr>
<td height="-1" align="center" bgcolor="D6DFF9"><div align="left">图片文件:</div></td>
<td height="4" align="center" bgcolor="E7EDFC"><div align="left">
<input name="images" type="text" id="images">
</div></td>
</tr>
<tr>
<td height="31" align="center" bgcolor="D6DFF9"> <div align="left">上传图片:</div></td>
<td height="31" align="center" bgcolor="E7EDFC"> <div align="left">
<iframe frameborder=0 width=400 height=20 scrolling=no src="../upfile.asp"></iframe>
</div></td>
</tr>
<tr>
<td height="10" align="center" bgcolor="D6DFF9"><div align="left">内容:</div></td>
<td height="10" align="center" bgcolor="E7EDFC"><div align="left">
<%call html()%>
<textarea name="content" id="content" style=display:none></textarea>
</div></td>
</tr>
<tr>
<td height="10" colspan="2" align="center"><input type="submit" name="Submit" value="确定保存"></td>
</tr>
</table>
</form>
</body>
</html>
以上是代码:
报错是报的是`````rs("tupian")=request("images")这行!
内容是:
Microsoft OLE DB Provider for SQL Server (0x80040E21)
多步 OLE DB 操作产生错误。如果可能,请检查每个 OLE DB 状态值。没有工作被完成。
/gongan/admin/haoshutupianadd.asp, 第 14 行
哪位高手哥哥给我讲讲,谢谢!~~~~~~!