我在程序调试的时候,出现一种错误,提示缺少';'但是、、、

diaorenhong 2003-08-21 04:19:25
但是我看了一下程序,却没有少,,
有谁碰到这种错误,我把代码发送给我,帮我调试一下,可以吗?
我已经调试了好几天了。。
...全文
56 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
diaorenhong 2003-08-23
  • 打赏
  • 举报
回复
请大家帮忙啊。。。
diaorenhong 2003-08-21
  • 打赏
  • 举报
回复
大家帮我调试一下程序好不好,,我急需这个程序啊,,
2599 2003-08-21
  • 打赏
  • 举报
回复
intdev
diaorenhong 2003-08-21
  • 打赏
  • 举报
回复
请大家帮忙调试一下,还有我想问一下,你们一般用什么调试工具阿。。
我现在觉得调试真的很痛苦啊。。。

diaorenhong 2003-08-21
  • 打赏
  • 举报
回复
这是subtree.asp的代码
<% dim conn,rs,s,cls,href
dim nodeid
nodeid=request.querystring("id")
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={SQL Server};server=192.168.0.4;uid=sa;pwd=;database=qas"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select *,(select count(*) from deeptree where parentid = T.id) as children from deeptree T where parentid='"&nodeid&"' and id<>'"&(nodeid)&"' ",conn,1,3


'以些文件来测试程序
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.CreateTextFile("c:\13.txt", True)
' 写入一行。
f1.WriteLine "select *,(select count(*) from deeptree where parentid = T.id) as children from deeptree T where parentid='"&nodeid&"' and id<>'"&(nodeid)&"' "




dim node_html
node_html="<table id='t"&nodeid&"' border='0' style='position:relative;left:18' cellspacing='0' cellpadding='0'>"


do while not rs.eof
if rs("id")<>rs("parentid") then
if rs("children")=0 then
s="."
cls="dirNode"
else
s="+"
cls="dirclose"
end if
end if
'修改expand部分加上两个双引号。。
node_html=node_html&"<tr><td id='node"&rs("id")&"' class='td_node'><span class='"&cls&"' id='dir"&rs("id")&"' onclick='expand("""&rs("id")&""")'>"&s&"</span><span class='node' id='s"&rs("id")&"' onclick='expand("""&rs("id")&""")' title='"&rs("content")&"' href='"&rs("link")&"'>"&rs("content")&"</span></td></tr>"



if rs("children")>0 then
node_html=node_html&"<tr id='load_"&rs("id")&"' style='display:none'><td class='td_node'><table border='0' cellspacing='0' cellpadding='0' style='position:relative;left:18;top:0'><tr><td class='td_node'><span class='dirNode'>.</span><span class='load'>Loading..s.</span></td></tr></table></td></tr>"
end if
rs.movenext
loop
node_html=node_html&"</table>"

f1.WriteLine node_html

set rs=nothing
set rs = Server.CreateObject("ADODB.Recordset")
rs.open "select link from deeptree where id='"&nodeid&"'",conn,1,3
%>
<script>
if(parent.document.getElementById("load_"+"<%=nodeid%>")){
parent.document.getElementById("load_"+"<%=nodeid%>").style.display="none"
parent.document.getElementById("node"+"<%=nodeid%>").innerHTML+="<%=node_html%>"
}
</script>
<%

f1.WriteBlankLines(1)
f1.Close

set rs=nothing
set conn=nothing
%>
diaorenhong 2003-08-21
  • 打赏
  • 举报
回复
代码有点长。。不好意思。。
程序我已经发了。。

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>CSDN deeptree---By Fason</title>
<link rel=stylesheet href="style.css" type="text/css">
</head>
<script>
function expand(id){
window.status=eval("s"+id).innerText;
getLight(id);
if(eval("s"+id).href!='')document.frames['nodehref'].location.href=eval("s"+id).href
switch(eval("dir"+id).innerText){//改变"+","-"
case "-":
eval("dir"+id).innerText="+";eval("dir"+id).className='dirclose';document.getElementById("load_"+id).style.display='none';break;
case "+":
eval("dir"+id).innerText="-";eval("dir"+id).className='diropen';document.getElementById("load_"+id).style.display='';break;
default:eval("dir"+id).innerText=".";eval("dir"+id).className='dirNode';
}
if(eval("dir"+id).innerText==".")return;
if(eval("dir"+id).innerText=="+"){if(document.getElementById("t"+id)){eval("t"+id).removeNode(true);return;}}
document.frames['hifm'].location.href="subtree.asp?id="+id
}

function getLight(id){//高亮度显示当前结点
var s=document.getElementsByTagName("SPAN")
var sn=document.getElementById("s"+id)
for(i=0;i<s.length;i++)if(s[i].className=='node')s[i].style.cssText="color:#000000;background-color:#f2f2f2"
sn.style.cssText="color:#000000;background-color:#ffffff;border:1 solid #999999"
}
</script>
<body topmargin="0" leftmargin="0" scroll="yes">
<% dim conn,rs
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={SQL Server};server=192.168.0.4;uid=sa;pwd=;database=qas "
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select *,(select count(*) from deeptree where parentid = id) as children from deeptree where id=parentid",conn,1,3
%>
<div align="center">
<center>
<table border="0" width="779" cellspacing="0" cellpadding="0" height=100% bgcolor="#F2F2F2">
<tr>
<td width="260" style="border-right:5 solid #6699cc" valign="top" align="left">
<div id=treedir style="overflow:auto;width:100%;height:100%">
<table border='0' cellspacing='0' cellpadding='0' style='position:relative;left:18;top:20' onselectstart="return false">
<%
do while not rs.eof
if rs("children")<=1 then
s="."
cls="dirNode"
else
s="+"
cls="dirclose"
end if
%>
<tr><td id="node<%=rs("id")%>" class='td_node' valign=top><span class='<%=cls%>' id='dir<%=rs("id")%>' onclick='expand("<%=rs("id")%>")'><%=s%></span><span class='node' id='s<%=rs("id")%>' onclick='expand("<%=rs("id")%>")' title='<%=rs("content")%>' href='<%=rs("link")%>'><%=rs("content")%></span></td></tr>


<% if rs("children")>1 then%>
<tr id="load_<%=rs("id")%>" style="display:none"><td class='td_node'><table border='0' cellspacing='0' cellpadding='0' style='position:relative;left:18;top:0'><tr><td class='td_node'><span class='dirNode'>.</span><span class='load'>Loading...d</span></td></tr></table></td></tr>
<%end if%>
<% rs.movenext
loop
%>
</table>
</div>
</td>
<td valign="top" align="left">
<iframe name=nodehref style="border:1 solid #3366cc;width:100%;height:100%;overflow:auto" src="about:blank" frameborder=0 ></iframe>
</td>
</tr>
</table>
</center>
</div>
<%
set rs=nothing
set conn=nothing
%>
<iframe id='hifm' width=0 height=0></iframe>

</body>
jiejifeng 2003-08-21
  • 打赏
  • 举报
回复
代码呢?
2599 2003-08-21
  • 打赏
  • 举报
回复
你直接把出错页面的代码贴出来不就完事了吗?
Brookes 2003-08-21
  • 打赏
  • 举报
回复
要看代码才知道。这种提示,原因可能很多
reidli 2003-08-21
  • 打赏
  • 举报
回复
这种情况很常见,调试的时候经常会碰见,大部分都不是缺少';'的原因。你把源码发给我看看吧.
reidli@163.net
maxid 2003-08-21
  • 打赏
  • 举报
回复
sendidmax@163.com
pp4u 2003-08-21
  • 打赏
  • 举报
回复
你看看是不是把;写成中文的;了。

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧