| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 460 人关注过本帖
标题:语句未结束
只看楼主 加入收藏
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
快速回复:语句未结束
数据加载中...
 
   



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

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