举例:
select * from table where 时间>='" & dtpicker1.value & "'and 时间 <='" dtpicker2.value & "'"
运行时系统提示: 标准表达示中数据类型匹配!
我的数据库是ACCESS.时间的数据类型是日期/时间型.
求高手指点一二.我只有三十分了,全部献上,在线争等.

解决方案 »

  1.   

    这个改试试看!select * from table where 时间>=#" & dtpicker1.value & "# and 时间 <=#" dtpicker2.value & "#"
      

  2.   

    access中日期型数据前后需要加“#”
    sql server中日期型数据前后需要加单引号“'”
      

  3.   

    看看这个帖子,可能对你有所帮助
    http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=175324
      

  4.   

    ACCESS 用#分隔符,sql 用'分隔符.
    还有最好用format(date,"yyyy-mm-dd hh:mm:ss")格式化一下.