| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 297 人关注过本帖
标题:代码运行不了~哪错不会改!!
只看楼主 加入收藏
xinzhilei
Rank: 1
等 级:新手上路
帖 子:49
专家分:5
注 册:2007-3-27
结帖率:0
收藏
 问题点数:0 回复次数:1 
代码运行不了~哪错不会改!!

大家帮我该下这段代码吧~~

求求帮下拉~~

我知道这断代码很多错误~~~就当帮帮初学者~

先说声:谢谢


<%
Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={Sql Server};Server=(local);UID=sa;PWD=;Database=db_schoolcomputer"
%>

<%if (request("tabname")<> "") then tabname=request("tabname")%>
<%
if (request("selected")<> "") then tabname=request("selected")
del="delete from "&tabname
conn.execute(del)
%>
<script language="javascript">
alert("<%=tabname%>已经删除")
</script>
<%end if%>
<script language="javascript">
function bb(){
var tabname=form.selectid.value
window.location.href="index.asp?tabname="+tabname
</script>
<script language="javascript">
function cc(){
window.location.href="index.asp"
</script>
<table width="335" border="0" cellpadding="0" cellspacing="0" align="center">
<form name="selected" method="post" action="index.asp">
<tr>
<td width="335" height="38" valign="top" align="center">
<select name="selected" id="selected" onchange="bb()">
<option selected>选者表单</option>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select name from sys where xtype='u'"
rs.open sql,conn,1,3
for i=1 to rs.recordcount
%>
<option value="<%=rs("name")%>"<%if rs("name")=tabname then response.write("selected")%>><%=rs("name")%></option>
<%
rs.movenext
next%>
</select>
</td>
</tr>
<%if (request("tabname")<> "") then tabname=request("tabname")%>
<%
set rs1=server.CreateObject("adodb.recordset")
sql="select top 5 from "&tabname
rs1.open sql,conn,1,3
if not(rs1.eof and rs1.bof) then
%>
<tr>
<%rs1.fields.count-1=Ecount
if Ecount>5 then
Ecount=4
end if%>
<%for i=1 to Ecount%>
<td height="25" valign="top"><%=rs1.fields(i).name%></td>
<%next%>
</tr>
<tr>
<%for ii=1 to rs1.recordcount%>
<%for i=1 to Ecount%>
<td height="25" valign="top"><%=rs1.fields(i).value%></td>
<%next%>
</tr>
<%rs1.movenext
next%>
<tr>
<td height="25" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<tr>
<td height="25" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<tr>
<td height="25" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<tr>
<td height="37" valign="top" align="conter">
<div align="center">
<input name="sub" type="submit" class="button" value="删除">
<input name="sub1" type="button" class="button" value="取消" onclick="cc()">

</div></td>
</tr>
<%end if
end if%>
</form>
</table>

搜索更多相关主题的帖子: 代码 运行 
2007-05-15 13:18
lq7350684
Rank: 6Rank: 6
等 级:贵宾
威 望:20
帖 子:5089
专家分:98
注 册:2006-11-6
收藏
得分:0 
报什么错啊?
2007-05-15 13:45
快速回复:代码运行不了~哪错不会改!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017059 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved