请教"标准表达式中数据类型不匹配,如何解决??"

zkabcd 2004-12-26 11:03:32
<%
set rs=conn.execute ("select * from T_equipment order by fixid asc")
no=1
%>



<%
if rs.eof then
Response.Write("<tr><td colspan=8 align=center>还没有添加系统!</td></tr>")
else
while not rs.eof
key=rs("fixid")

sql="select * from T_list where systemid='"&systemID&"'and fixid='"&key&"' order by elementid asc"
rss.open sql,conn,3,2
cediantotal=rss.recordcount
rss.close
rss.open "select * from T_list where systemid='"&systemID&"'and fixid='"&key&"' and Tstate=1",conn,3,2
tiaoshicdshu=rss.recordcount
rss.close
weitiaoshu=cediantotal-tiaoshicdshu
tiaoshiperc=Round(tiaoshicdshu/cediantotal*100,1)

%>


运行时出现
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e07'
[Microsoft][ODBC Microsoft Access Driver] 标准表达式中数据类型不匹配。

/debug/systemList.asp,行 113

既sql=" 表达式中数据类型不匹配

请教高手帮帮忙


...全文
1615 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
huang928 2004-12-27
  • 打赏
  • 举报
回复
如果是数值型字段就不用单引号,如果是字符型字段就加上单引号.
cheng17 2004-12-26
  • 打赏
  • 举报
回复
看一下数据库,如果systemid,fixid是数字型,去掉单引号
passionke 2004-12-26
  • 打赏
  • 举报
回复
sql="select * from T_list where systemid="&systemID&" and fixid="&key&" order by elementid asc"

单引号去掉
scoutlin 2004-12-26
  • 打赏
  • 举报
回复
sql="select * from T_list where systemid="&systemID&"and fixid="&key&" order by elementid asc"

试一下把单引去掉
zkabcd 2004-12-26
  • 打赏
  • 举报
回复
补充一句
sql="select * from T_list where systemid='"&systemID&"'and fixid='"&key&"' order by elementid asc"

systemid,fixid为数值型字段

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧