ODBC 驱动程序不支持此要求内容。

ezhs3809635 2002-04-17 05:22:47
这个错误是何种原因?请高脚们指点指点!
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21'
ODBC 驱动程序不支持此要求内容。
/showfile.asp, 列10
showfile.asp的代码是:
<!--#include file="config.inc"-->
<%
name=Request.QueryString("filename")
if name="" then
response.write"sorry,no file"
else
wh=name
end if
Set conn=Server.CreateObject("ADODB.Connection")
rs.Open "Select * From Upload where FileName='"&wh&"'",conn,1
if not rs.EOF then
Response.ContentType = rs("MIME")
Response.BinaryWrite rs("FileValue")
end if
%>
...全文
107 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
仲仓戟 2002-04-17
  • 打赏
  • 举报
回复
楼上正解……
Set conn=Server.CreateObject("ADODB.Connection")
rs.Open "Select * From Upload where FileName='"&wh&"'",conn,1

到底是对哪个数据库进行操作?数据库是哪种类型?FAINT……
julyclyde 2002-04-17
  • 打赏
  • 举报
回复
你的conn只定义了但是没打开,所以rs也就无法打开
给分
ezhs3809635 2002-04-17
  • 打赏
  • 举报
回复
the same as ago
MeXP 2002-04-17
  • 打赏
  • 举报
回复
改为
Set conn=Server.CreateObject("ADODB.Connection")
sql="Select * From Upload where FileName='"&wh&"'"
rs.Open sql,conn,1
试试

28,391

社区成员

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

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