急!!!!!asp中查询问题

来源:百度知道 编辑:UC知道 时间:2024/05/25 04:30:35
if key<>"" then
sql="select * from T_zhaopin where zhiwei1="&zhiwei1&" and zhiweixiangxi1="&zhiweixiangxi1&" and sheng1="&sheng1&" and shi1="&shi1&" and (date()-datevalue(F_LastLoginTime))<"&data&" and X_introduction like '%"&key&"%' order by f_ID desc"
end if

rs.open sql,conn,1,1<<<<<<<<<<<<<<<<<<<<<<<提示错误
if rs.eof and rs.bof then
response.write"<SCRIPT language=JavaScript>alert('对不起,没有符合搜索条件的记录!');history.back(-1);</SCRIPT>"
end if

ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/rencai/searchli1.asp, 第 145 行

我的数据库中zhiwei1,zhiweixiangxi1,sheng1,shi1都是数字型的 到底错误在哪啊 求大家帮忙

是否在searchli1.asp页面,调用了数据库连接页面呢
若已调用数据库连接页面,那麽是否在T_zhaopin 表中,有满足查询条件的资料呢

字段有多长啊??试试出了clng(string)或者cInt(string)的方式把它格式化为数字