日期:2014-05-17  浏览次数:20925 次

asp 读取xls数据,加上where就出错,不知道为什么
asp 读取xls数据,加上where就出错,不知道为什么

constr="Provider=Microsoft.Jet.OleDb.4.0;Persist Security Info=True;Data Source=" & strpath & ";Extended ProPerties=""Excel 8.0;HDR=YES;IMEX=1"";"
 
set xlsconn=server.createobject("adodb.connection")
xlsconn.connectionstring=constr
xlsconn.open() 

select * from ['4-20110811-4878$'] //这样就正常
select * from ['4-20110811-4878$'] where 电话号码='1' //这样就出错

xls有个列名 就是 “电话号码”


------解决方案--------------------
先看下你的xls里电话号码的字段属性是什么,不是数字型的你的条件写的就有错误