为什么我的asp后台中不能写进数据库!各位高手帮帮我啊!谢了啊!源码如下!
时光如水 2008-05-23 10:54:54 <!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<%if Request.QueryString("mark")="southidc" then
id=request("id")
dj_name=Trim(Request("dj_name"))
djcatid=Trim(Request("djcatid"))
desc=Trim(Request("desc"))
pic=Trim(Request("pic"))
url=Trim(Request("url"))
Set rs_news = Server.CreateObject("ADODB.Recordset")
sql="select * from dj where dj_id="&id
rs_news.open sql,conn,1,3
rs_news("dj_name")=dj_name
rs_news("djcat_id")=djcatid
rs_news("dj_desc")=desc
rs_news("dj_pic")=pic
rs_news("dj_url")=url
rs_news("dj_date")=Date()
rs_news.update
rs_news.close
response.redirect "Admin_Honor.asp"
end if
%>
<SCRIPT language=javascript src="zyok.JS"></SCRIPT>
<%
id=request.querystring("id")
Set rs_news = Server.CreateObject("ADODB.Recordset")
rs_news.Open "Select * From dj where dj_id="&id, conn,1,1
%>
<!-- #include file="Inc/Head.asp" -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><table width="780" border="0" cellpadding="2" cellspacing="1" class="table_southidc">
<tr>
<td class="back_southidc" height="25"> <div align="center"><strong>修改 <br>
</strong></div></td>
</tr>
<tr>
<form method="post" name="myform" action="Admin_HonorEdit.asp?mark=southidc">
<input type=hidden name=id value=<%=id%>>
<td><div align="center">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr bgcolor="#ECF5FF">
<td width="10%" height="25">
<div align="center">影音名称</div></td>
<td>
<input name="name" type="text" id="name" size="40" value="<%=rs_news("dj_name")%>"></td>
</tr>
<tr bgcolor="#ECF5FF">
<td width="10%" height="25">
<div align="center">影音分类</div></td>
<td>
<select name="djcatid" id="djcatid">
<%
sql="select * from djcat"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof%>
<option value="<%=rs2("djcat_id")%>" <%if rs2("djcat_id")=rs("djcat_id") then response.write "selected" end if%>><%=rs2("djcat_name")%></option>
<%rs2.movenext
loop
if rs2.eof and rs2.bof then%>
<option value="0">当前没有影音分类</option>
<%end if%>
</select>
<select name="pic">
<option value="asf" <%if rs("dj_pic")="asf" then response.write "selected" end if%>>ASF音乐</option>
<option value="asfmtv" <%if rs("dj_pic")="asfmtv" then response.write "selected" end if%>>ASF影视</option>
<option value="rm" <%if rs("dj_pic")="rm" then response.write "selected" end if%>>RAM音乐</option>
<option value="rmmtv" <%if rs("dj_pic")="rmmtv" then response.write "selected" end if%>>RAM影视</option>
<option value="flash" <%if rs("dj_pic")="flash" then response.write "selected" end if%>>FLASH动画</option>
</select>
<select name="desc">
<option value="☆☆★★★">推荐等级</option>
<option value="☆☆☆☆★">☆☆☆☆★</option>
<option value="☆☆☆★★">☆☆☆★★</option>
<option value="☆☆★★★" selected>☆☆★★★</option>
<option value="☆★★★★">☆★★★★</option>
<option value="★★★★★">★★★★★</option>
</select>
<%
ranNum=int(9*rnd)+10
iddata=month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum
%></td>
</tr>
<tr bgcolor="#ECF5FF">
<td width="10%" height="25">
<div align="center">url地址</div></td>
<td>
<input name="url" type="text" id="url" size="60" value="<%=rs_news("dj_url")%>"></td>
</tr>
<tr bgcolor="#ECF5FF">
<td height="22"> </td>
<td colspan="2"> </td>
</tr>
<tr bgcolor="#ECF5FF">
<td height="25" colspan="2">
<div align="center">
<input name="submit" type="submit" value="确定">
<input name="reset" type="reset" value="从来">
</div></td>
</tr>
</table>
</div></td>
</form>
</tr>
</table></td>
</tr>
</table>
<!-- #include file="Inc/Foot.asp" -->