当前位置: 代码迷 >> ASP >> asp 读取xls数据,加上where就出错,不知道为什么,该怎么处理
  详细解决方案

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

热度:99   发布时间:2012-03-25 20:55:16.0
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里电话号码的字段属性是什么,不是数字型的你的条件写的就有错误
  相关解决方案