ACCESS数据库怎么了!!

gebobo 2008-10-29 09:16:30
我在ACCESS有一个字段 CHECKTIME ( 日期/时间类型的)
例如: userid checktime
001 2008-07-21 12:10:42
002 2008-07-21 15:11:42

我写了一条SQL语句,他说标准表达式中数据类型不匹配
select * from checkinout where userid='" + Trim(.TextMatrix(.Row, 5)) + "'and checktime=#" + .TextMatrix(.Row, 6) + "#"
...全文
38 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
饮水需思源 2008-10-29
  • 打赏
  • 举报
回复
'将+换成&,在and前加空格
strsql="select * from checkinout where userid='" & Trim(.TextMatrix(.Row, 5)) & "' and checktime=#" & .TextMatrix(.Row, 6) & "#""
饮水需思源 2008-10-29
  • 打赏
  • 举报
回复
'将+换成&,在and前加空格
select * from checkinout where userid='" & Trim(.TextMatrix(.Row, 5)) & "' and checktime=#" & .TextMatrix(.Row, 6) & "#"
jhone99 2008-10-29
  • 打赏
  • 举报
回复
userid 的数据类型应该是文本
checktime 的数据类型应该是日期/时间
jhone99 2008-10-29
  • 打赏
  • 举报
回复
STRSQL="select * from checkinout where userid='" + Trim(.TextMatrix(.Row, 5)) + "' and checktime=#" + .TextMatrix(.Row, 6) + "#"

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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