用户代码未处理OleDbException:标准表达式中数据类型不匹配
来源:岁月联盟
时间:2012-02-04
select * from [Sheet1$] where pscode=410100
解决办法:
1、字段名都用中括号括起来 pscode 变成[pscode]
2、条件如果是字符串类型要加' ' [pscode]='410100'
最终代码为:
select * from [Sheet1$] where [pscode]='410100'
摘自 朱金拖的专栏