日期:2014-05-17 浏览次数:20688 次
<% dim htmldata,rs,sql htmlData = Request.Form("content1") if Request.QueryString("mark")="southidc" then If request.form("title")="" Then Response.Write("<script language=""JavaScript"">alert(""错误:您没输入标题,请返回检查!!"");history.go(-1);</script>") response.end end if If htmlData="" Then Response.Write("<script language=""JavaScript"">alert(""错误:您没输入内容,请返回检查!!"");history.go(-1);</script>") response.end end if Set rs = Server.CreateObject("ADODB.Recordset") sql="select * from news" rs.open sql,conn,1,3 rs.addnew rs("BigClassName")=trim(request.Form("BigClassName")) rs("SmallClassName")=trim(request.Form("SmallClassName")) rs("Title")=trim(request.Form("title")) rs("Content")=trim(htmlData) rs("User")=trim(request.Form("user")) rs("AddDate")=date() rs("showorder")=trim(request.Form("showorder")) rs.update rs.close set rs=nothing 'response.Write("<script language=javascript>location.href='News_Manage.asp';<//script>") end if %>
<% StrSQL="DBQ="+server.mappath("db1.mdb")+";DRIVER={Microsoft Access Driver (*.mdb)};" 'StrSQL="DSN=news;" set conn=server.createobject("ADODB.CONNECTION") conn.open StrSQL %>
------解决方案--------------------
你有没有连接数据库的语句?错误代码是什么?
------解决方案--------------------
既然有连接数据,看这情况没错,你写不进去,提示的什么呢
------解决方案--------------------
具体错误提示是什么?