| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 693 人关注过本帖
标题:看看那出错了
只看楼主 加入收藏
sncelpl
Rank: 1
等 级:新手上路
帖 子:87
专家分:0
注 册:2006-6-28
结帖率:86.67%
收藏
 问题点数:0 回复次数:2 
看看那出错了

<%
Set rst= Server.CreateObject("ADODB.Recordset")
if whe="全部" then
sql="select articleid,title,hits from learning where canlook<>3 order by hits desc"
else
sql="select articleid,title,hits from learning where where='"&whe&"' and canlook<>3 order by hits desc"
end if
rst.open sql,conn,1,1
if rst.eof and rst.bof then
response.write "<p align='center'> 该栏目没有任何电影</p>"
else

i=0
do while not rst.eof
i=i+1
%>
这段代码是那错了SQL数据库怎么提示:
Microsoft OLE DB Provider for SQL Server 错误 '80040e14'
在关键字 'where' 附近有语法错误。

/where.asp,行 166

行 166 是 : rst.open sql,conn,1,1

搜索更多相关主题的帖子: hits rst sql learning 
2006-07-08 19:08
labid
Rank: 1
等 级:新手上路
帖 子:151
专家分:0
注 册:2006-6-20
收藏
得分:0 

<%
Set rst= Server.CreateObject("ADODB.Recordset")
if whe="全部" then
sql="select articleid,title,hits from learning where canlook<>3 order by hits desc"
else
sql="select articleid,title,hits from learning where where='"&whe&"' and canlook<>3 order by hits desc"
end if

rst.open sql,conn,1,1
if rst.eof and rst.bof then
response.write "<p align='center'> 该栏目没有任何电影</p>"
else

i=0
do while not rst.eof
i=i+1
%>

多了一个where

2006-07-09 02:07
hangxj
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2045
专家分:0
注 册:2006-4-10
收藏
得分:0 

http://www./
2006-07-10 09:30
快速回复:看看那出错了
数据加载中...
 
   



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

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