这句那个地方有错了啊??

twhouse 2005-04-07 02:14:48
rsc.open "select typename from type where typeid=" & rs("purview"),conn,1,1
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。
...全文
98 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
listry_cheng 2005-04-07
  • 打赏
  • 举报
回复
看看 response.write ("select typename from type where typeid="&rs("purview")) 出来的结果是什么

再看看需要改成 select [typename] from [type] where [typeid]='"&rs("purview")&"'" 吗?
aspnet003 2005-04-07
  • 打赏
  • 举报
回复
rsc.open "select typename from type where typeid=" & rs("purview"),conn,3,1
twhouse 2005-04-07
  • 打赏
  • 举报
回复
Microsoft JET Database Engine (0x80040E14)
语法错误 (操作符丢失) 在查询表达式 'typeid=' 中。
/admin/usermanage.asp, 第 147 行
listry_cheng 2005-04-07
  • 打赏
  • 举报
回复
看来问题出在ODBC上了,把连接改成OLE吧
Set conn= Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(dbPath)
twhouse 2005-04-07
  • 打赏
  • 举报
回复
还是一样....
hinavy 2005-04-07
  • 打赏
  • 举报
回复
把你的数据库连接改成ole连接方式
hbhbhbhbhb1021 2005-04-07
  • 打赏
  • 举报
回复
再不行就写成
rsc.open "select typename from [type] where typeid='" & rs("purview") & "'",conn,1,1
hbhbhbhbhb1021 2005-04-07
  • 打赏
  • 举报
回复
type是关键字
rsc.open "select typename from [type] where typeid=" & rs("purview"),conn,1,1
twhouse 2005-04-07
  • 打赏
  • 举报
回复
还是一样的错误提示~
zhangyue8818 2005-04-07
  • 打赏
  • 举报
回复
错在& rs("purview"),不允许这样写,你可以将这个值提前写出来,如:
purview = rs("purview")
rsc.open "select typename from type where typeid=" & purview,conn,1,1

28,406

社区成员

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

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