"select * from student where " & str1(List1.ListIndex) & " >= " & date1 & " and " & str1(List1.ListIndex) & " <= " & date2 错在

wp03141592 2003-08-22 04:00:27
"select * from student where " & str1(List1.ListIndex) & " >= " & date& " and " & str1(List1.ListIndex) & " <= " & date2
错在那里?
其中date1,和date2为日期型
...全文
17 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wp03141592 2003-08-22
  • 打赏
  • 举报
回复
谢谢
wp03141592 2003-08-22
  • 打赏
  • 举报
回复
该成
str = "select * from student where " & str1(List1.ListIndex) & " >= #" & date1 & "# and " & str1(List1.ListIndex) & " <= #" & date2 & "#"
错误是没了,
但查询的结果不正确!
zqfleaf 2003-08-22
  • 打赏
  • 举报
回复
"select * from student where " & str1(List1.ListIndex) & " >= '" & date& "' and " & str1(List1.ListIndex) & " <= '" & date2 &"'"
如果是access是#

1,216

社区成员

发帖
与我相关
我的任务
社区描述
VB 数据库(包含打印,安装,报表)
社区管理员
  • 数据库(包含打印,安装,报表)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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