标题:语句未结束
只看楼主
yan876768390
Rank: 1
等 级:新手上路
帖 子:8
专家分:2
注 册:2010-11-7
结帖率:50%
已结贴  问题点数:20 回复次数:3 
语句未结束
<script language="vbscript">

Dim conn,rs,sqlstr
Set conn = CreateObject("ADODB.Connection")
conn.connectionstring = "Provider = SQLOLEDB;DATA SOURCE=SUDA-20110415KF;Initial Catalog=usedb;Integrated Security=SSPI;";   

conn.open
Set rs = CreateObject("ADODB.RecordSet")
sqlstr = "Select top 1 * from usetb"
rs.open sqlstr,conn,1,2
document.write rs(0) & " " & rs(1)
rs.close
Set rs = nothing
conn.close
Set conn = nothing
</script>


提示蓝色部分语句为结束,希望各位高手帮忙看看
搜索更多相关主题的帖子: top nothing 
2011-08-30 15:50
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
得分:20 
这是ASP代码,要放到<% %>里的

----我怎能在别人的苦难面前转过脸去----
2011-08-30 15:54
yan876768390
Rank: 1
等 级:新手上路
帖 子:8
专家分:2
注 册:2010-11-7
得分:0 
<%

<script language="vbscript">

Dim conn,rs,sqlstr
Set conn = CreateObject("ADODB.Connection")
conn.connectionstring = "Provider = SQLOLEDB;DATA SOURCE=SUDA-20110415KF;Initial Catalog=usedb;Integrated Security=SSPI;";   

conn.open
Set rs = CreateObject("ADODB.RecordSet")
sqlstr = "Select top 1 * from usetb"
rs.open sqlstr,conn,1,2
document.write rs(0) & " " & rs(1)
rs.close
Set rs = nothing
conn.close
Set conn = nothing
</script>
%>
请问是这样么?我是新手,麻烦详细说一下,谢谢
2011-08-30 16:03
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
得分:0 
<%
Dim conn,rs,sqlstr
Set conn = CreateObject("ADODB.Connection")
conn.connectionstring = "Provider = SQLOLEDB;DATA SOURCE=SUDA-20110415KF;Initial Catalog=usedb;Integrated Security=SSPI;";   

conn.open
Set rs = CreateObject("ADODB.RecordSet")
sqlstr = "Select top 1 * from usetb"
rs.open sqlstr,conn,1,2
document.write rs(0) & " " & rs(1)
rs.close
Set rs = nothing
conn.close
Set conn = nothing
%>

----我怎能在别人的苦难面前转过脸去----
2011-08-30 16:24



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-348717-1-1.html




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

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