Microsoft JET Database Engine 错误 '80040e14'

zzzzzc7 2012-12-11 03:54:37
Microsoft JET Database Engine 错误 '80040e14'

多余的 ) 在查询表达式 'IsSelected=True and (ChannelID=-1 or ChannelID=) and (ShowType=0 or ShowType=1) and (OutTime=0 or OutTime>DateDiff('d',DateAndTime, Now()))' 中。

/Include/PowerEasy.Common.Front.asp,行 638

帮忙看下哪里有问题。
源码:
If AnnounceNum > 0 And AnnounceNum <= 10 Then
sqlAnnounce = "select top " & AnnounceNum
Else
sqlAnnounce = "select top 10"
End If
If ContentLen < 0 Then
ContentLen = 100
End If
sqlAnnounce = sqlAnnounce & " * from PE_Announce where IsSelected=" & PE_True & " and (ChannelID=-1 or ChannelID=" & ChannelID & ") and (ShowType=0 or ShowType=1) and (OutTime=0 or OutTime>DateDiff(" & PE_DatePart_D & ",DateAndTime, " & PE_Now & ")) order by ID Desc"
Set rsAnnounce = Conn.Execute(sqlAnnounce)


...全文
113 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
IEEE_China 2012-12-11
  • 打赏
  • 举报
回复
如果 ChannelID 是数值 类型,检查是否为空。
IEEE_China 2012-12-11
  • 打赏
  • 举报
回复

or ChannelID=) 

--检查ChannelID 的值。

28,391

社区成员

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

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