这个问题原因?

di78da 2003-10-26 04:20:58
错误提示:错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。
/线路工作票/first/write_1.asp, 第 212 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)

网页:
显示是好的,但当我查询是出错:
代码:
dim bgcolor
set rs3=server.createobject("adodb.recordset")
if WorkGroup="" then
if TicketState="" then
if PlanBeginWorkTime_1="" and PlanEndWorkTime_1="" then
SQL ="select * from WorkTicketInfo where TicketClass=1 order by ID desc"
elseif PlanBeginWorkTime_1<>"" and PlanEndWorkTime_1<>"" then
SQL ="select * from WorkTicketInfo where TicketClass=1 and PlanBeginWorkTime between " & "#" & PlanBeginWorkTime_1 & "# and #" & PlanEndWorkTime_1 & "# order by ID desc"
end if
elseif TicketState<>"" then
if PlanBeginWorkTime_1="" and PlanEndWorkTime_1="" then
SQL ="select * from WorkTicketInfo where TicketClass=1 and TicketState="&TicketState&" order by ID desc"
elseif PlanBeginWorkTime_1<>"" and PlanEndWorkTime_1<>"" then
SQL ="select * from WorkTicketInfo where TicketState="&TicketState&"and TicketClass=1 and PlanBeginWorkTime between " & "#" & PlanBeginWorkTime_1 & "# and #" & PlanEndWorkTime_1 & "# order by ID desc"
end if
end if
elseif WorkGroup<>"" then
if TicketState="" then
if PlanBeginWorkTime_1="" and PlanEndWorkTime_1="" then
SQL ="select * from WorkTicketInfo where TicketClass=1 and WorkGroup='"&WorkGroup&"'order by ID desc"
elseif PlanBeginWorkTime_1<>"" and PlanEndWorkTime_1<>"" then
SQL ="select * from WorkTicketInfo where TicketClass=1 and WorkGroup='"&WorkGroup&"' and PlanBeginWorkTime between " & "#" & PlanBeginWorkTime_1 & "# and #" & PlanEndWorkTime_1 & "# order by ID desc"
end if
elseif TicketState<>"" then
if PlanBeginWorkTime_1="" and PlanEndWorkTime_1="" then
SQL ="select * from WorkTicketInfo where TicketClass=1 and TicketState="&TicketState&"and WorkGroup='"&WorkGroup&"'order by ID desc"
elseif PlanBeginWorkTime_1<>"" and PlanEndWorkTime_1<>"" then
SQL ="select * from WorkTicketInfo where TicketState="&TicketState&" and WorkGroup='"&WorkGroup&"'and TicketClass=1 and PlanBeginWorkTime between " & "#" & PlanBeginWorkTime_1 & "# and #" & PlanEndWorkTime_1 & "# order by ID desc"
end if
end if
end if
rs3.open sql,conn,1,1
用ACCESS数据库是好的,但改为SERVER SQL 就出错!帮我改一下!谢了!

...全文
10 点赞 收藏 2
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
乱就一个字
回复
nchen123 2003-10-26
代码太乱了,最好加点注释,改一下排版在贴上来。指出你出错的一行在哪里
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2003-10-26 04:20
社区公告
暂无公告