asp+access 时间问题
来源:互联网 发布:2017双十一大数据分析 编辑:程序博客网 时间:2024/06/17 04:44
请大家帮忙看看我的这段代码哪里错误了
Set Rss=Server.Createobject("adodb.recordset")
Rss.Open "Select top 6 ID,NewsTitle,Infotime From NewsInfo where IsShow=True and ClassTreeID="&Trim(Rs("ClassTreeID"))&" and Infotime=<=#"&Rs("Infotime")&"#> and ID<>"&Trim(Rs("ID"))&" Order By Infotime Desc",Conn,1,1
Do While Not Rss.Eof
Response.Write "<li>"
Response.Write "<a href=""news-view.asp?id="&Trim(Rss("ID"))&""" title="""&Trim(Rss("NewsTitle"))&""">"
Response.Write Trim(Rss("NewsTitle"))
Response.Write "</a>"
Response.Write "</li>"
Rss.MoveNext
Loop
Rss.close
Set Rss=nothing
我调试时老是报 日期的语法错误 在查询表达式 'IsShow=True and ClassTreeID=1 and Infotime=#2010-7-8 下午 01:57:15# and ID<>2' 中。
/hy/news-view.asp, 第 82 行
我的数据库里的Infotime这个字段的值是:2010-7-8 下午 01:57:15
Set Rss=Server.Createobject("adodb.recordset")
Rss.Open "Select top 6 ID,NewsTitle,Infotime From NewsInfo where IsShow=True and ClassTreeID="&Trim(Rs("ClassTreeID"))&" and Infotime=<=#"&Rs("Infotime")&"#> and ID<>"&Trim(Rs("ID"))&" Order By Infotime Desc",Conn,1,1
Do While Not Rss.Eof
Response.Write "<li>"
Response.Write "<a href=""news-view.asp?id="&Trim(Rss("ID"))&""" title="""&Trim(Rss("NewsTitle"))&""">"
Response.Write Trim(Rss("NewsTitle"))
Response.Write "</a>"
Response.Write "</li>"
Rss.MoveNext
Loop
Rss.close
Set Rss=nothing
我调试时老是报 日期的语法错误 在查询表达式 'IsShow=True and ClassTreeID=1 and Infotime=#2010-7-8 下午 01:57:15# and ID<>2' 中。
/hy/news-view.asp, 第 82 行
我的数据库里的Infotime这个字段的值是:2010-7-8 下午 01:57:15
0 0
- asp+access 时间问题
- ASP+Access乱码问题
- asp access 中文问题
- asp+access数据库写入问题
- ASP中Access语句比较时间
- access 更新时间类型遇到的问题
- ASP中access数据库的路径问题
- ASP中access数据库的路径问题
- ASP + Access 大数据生成 Excel 问题
- Win7搭iis+asp+access的问题
- C# asp.net 时间问题
- asp access
- asp+access
- 【ASP】在ACCESS日期/时间字段插入空值或者将原来的时间值清空
- 关于Access Insert Into 语句的时间插入问题?
- (C#)Access中插入时间类型注意的问题
- 在access中query时间问题的解决
- Delphi 中Access的 时间日期查询问题
- Android实战-怎样获取到Android控件的高度
- iOS黑魔法--Method Swizzling
- windows下MyEclipse初次配置hadoop问题
- 登陆界面验证程序,缺少 'End' ?高分相送。谢谢
- ubuntu 桌面找回
- asp+access 时间问题
- 文章标题
- 二叉树面试题(二)---求一颗二叉树的镜像
- Java学习笔记——abstract class和interface的区别
- Hibernate注解开发
- 使用Log4j进行日志操作
- Android Edittext 游标问题
- MySQL索引
- Spring注解@Component、@Repository、@Service、@Controller区别