rstemp1.Open "select * from zhe2 where 宽='"& IntA &"' ", conn1, adOpenKeyset, adLockOptimistic提示类型不皮配其中IntA 为integer    宽在Access 中是数字型,
百思不得其解?

解决方案 »

  1.   

    rstemp1.Open "select * from zhe2 where 宽="& IntA ,conn1, adOpenKeyset, adLockOptimistic去掉单引号试试
      

  2.   

    数字型、日期型的变量SQL查询在access中不用单引号的,同意ljhdi
      

  3.   

    rstemp1.Open "select * from zhe2 where 宽='"& IntA &"' ", conn1
    我想像这句写错了吧,IntA你都说了是整形的了,就不有再加上单引号了,改为
    retemp1.open "select * from zhe where 宽=" &cstr(inta),conn1,adopendynamic,adlockoptimistic,adcmdtext