找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 103|回复: 2

[求助]各位,谁能指点我啊?

[复制链接]
发表于 2010-1-15 05:43:26 | 显示全部楼层 |阅读模式 IP:江苏扬州
谁能帮我看看,这段代码哪里不对了。
出错显示:
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC Microsoft Access Driver] 标准表达式中数据类型不匹配。



<%

sql="select user.* from user,user_info where user.user_name like '%' and user.user_name=user_info.user_name"
if sex<>"无特别要求" then
sql=sql&" and sex='"&sex&"'"
end if
if married<>"无特别要求" then
sql=sql&" and married='"&married&"'"
end if
if relation<>"无特别要求" then
sql=sql&" and relation='"&relation&"'"
end if
if province<>"无特别要求" then
sql=sql&" and work_province='"&province&"'"
end if
'///////////////////////////


if height<>"无特别要求" and height<>"" then

if height="150厘米以下" then
sql=sql&" and height<150"
elseif height="150-154厘米" then
sql=sql&" and height>=150 and height<=154"
elseif height="155-159厘米" then
sql=sql&" and height>=155 and height<=159"
elseif height="160-164厘米" then
sql=sql&" and height>=160 and height<=164"
elseif height="165-169厘米" then
sql=sql&" and height>=165 and height<=169"
elseif height="170-174厘米" then
sql=sql&" and height>=170 and height<=174"
elseif height="175-179厘米" then
sql=sql&" and height>=175 and height<=179"
elseif height="180-184厘米" then
sql=sql&" and height>=180 and height<=184"
elseif height="185-189" then
sql=sql&" and height>=185 and height<=189"
elseif height="190-194厘米" then
sql=sql&" and height>=190 and height<=194"
elseif height="195-199厘米" then
sql=sql&" and height>=195 and height<=199"
elseif height="200厘米以上" then
sql=sql&" and height>=200"
end if



end if


''''''''''''''''
temp=year(date)
if age="1" then
byear=temp-18
sql=sql&" and byear>'"&byear&"'"
elseif age="2" then
sql=sql&" and byear<'"&temp-18&"'"
sql=sql&" and byear>'"&temp-25&"'"
elseif age="3" then
sql=sql&" and byear<'"&temp-24&"'"
sql=sql&" and byear>'"&temp-31&"'"
elseif age="4" then
sql=sql&" and byear<'"&temp-30&"'"
sql=sql&" and byear>'"&temp-41&"'"
elseif age="5" then
sql=sql&" and byear<'"&temp-40&"'"
end if
'///////////////////////////
if education="1" then
sql=sql&" and education='初中'"
elseif education="2" then
sql=sql&" and education in('高中','专科','本科','硕士','博士')"
elseif education="3" then
sql=sql&" and education in('专科','本科','硕士','博士')"
elseif education="4" then
sql=sql&" and education in('本科','硕士','博士')"
elseif education="5" then
sql=sql&" and education in('硕士','博士')"
elseif education="6" then
sql=sql&" and education='博士'"
end if
'////////////////////////////////

if salary<>"无特别要求" then
sql=sql&" and salary='"&salary&"'"


end if

'////////////////////////////////////////
set rs3=server.CreateObject ("ADODB.recordset")
rs3.Open sql,conn1,3
'Response.Write "<P>"&sql&"</P>"
'Response.End
%>
发表于 2010-2-10 20:05:05 | 显示全部楼层 IP:日本
楼主强呀,这样贴子也能发表出来,对你佩服之心比长江的水还多哦
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 15:27 , Processed in 0.191216 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表