急急急!!!一个简单而又复杂的问题?

jamex 2000-08-01 04:09:00
在下的asp代码出现如下错误:
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21'

The request properties can not be supported by this ODBC Driver.

/luntan/list.asp, 行53

我估计是性能问题,请各位大虾赐教!不胜感激
...全文
141 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
hhzh426 2000-09-03
  • 打赏
  • 举报
回复
msdn的解释:
SYMPTOMS
One of the following error occurs when trying to access a SQL database via Active Server Pages (ASP):


Error '80004005'

Microsoft OLE DB Provider for ODBC Drivers error '80040e21', Errors
Occurred

-or-

80004005: ConnectionWrite(GetOverLappedResult)


The error occurs on the second access to the data. For example, using a form generated by the DataForm Wizard clicking on the ">>" button to view the next 10 records results in the error described above.
This issue occurs when all of the following conditions are met:

Active Server Pages that have forced NT LanMan (NTLM) authentication either by disabling "Allow Anonymous" and enabling "NT Challenge/Response" or by setting Web permissions that would force a NT Challenge/Response.
The Web browser on a different machine than the Internet Information Server (IIS).
The recordset object stored in a Session variable.

NOTES: In this scenario, if BASIC/Clear Text is turned on and NTLM is turned off, then this script runs correctly. NTLM makes this problem surface.


CAUSE
When the allow Anonymous User context is turned off, NT is closing the pipe to SQL Server after the first request is complete. This is because the first connection to SQL Server is made under the IIS Anonymous User account. IIS then either impersonates the browser client on that same thread, or tries to access the connection on a different thread that is running in the impersonated user context. In either case NT would detect the attempt to use a network named pipe handle that had been opened in a different user context and force the pipe closed, per its security rules.

When the connections are viewed on the SQL Server with a network monitor, a name pipe close request comes from NT, causing the error in the Web browser.



RESOLUTION
There are two relatively easy workarounds:


If SQL Server is running on the same machine as IIS, you can use a local named pipe connection instead of a network named pipe connection. NT security rules would not be forced as the pipe is a local connection, rather than a network connection that can be impersonated by the Anonymous User account. In the SQL Server connection string of the Global.asa file, change the keyword SERVER=machinename to SERVER=(local). The server name "(local)" with parenthesis is a special keyword to the SQL Server ODBC driver.

You can use a non-authenticated protocol between IIS and SQL Server, such as TCP/IP sockets. This works when SQL Server is running on either the same machine or a different machine than IIS. To do so, you must configure both the SQL Server and the SQL Server client on the IIS machine:
a. To configure SQL Server to listen on TCP/IP sockets as well as


named pipes, run SQL Setup. From the Microsoft SQL Server 6.5
Options dialog box, click Change Network Support and Continue.
Select the entry for TCP/IP Sockets (leave Named Pipes also
selected) and click OK. Accept the default Named Pipe name and
TCP/IP Socket number. Exit SQL Setup. Stop and restart SQL Server.

b. To configure the SQL Server client on the machine running IIS (the


same or different machine as the SQL Server), select SQL Client
Configuration Utility. Click the Net Library tab and select "TCP/IP
Sockets" as the Default Network. Click Done. IIS should now use
TCP/IP sockets when connecting to SQL Server.


msdn的第二种解释:
SYMPTOMS
One of the following errors occurs when passing a date to a SQL Stored Procedure:


Microsoft OLD DB Provider for ODBC Drivers error 80004005
At least one parameter contained a type that was not supported.

-OR-

Microsoft OLD DB Provider for ODBC Drivers error 80040e21
Driver not capable.


CAUSE
The data type of the parameter being passed to the stored procedure does not match the data type the stored procedure is expecting. For example, passing a value of "7/21/97" to a stored procedure that is expecting DateTime data will cause the error.



RESOLUTION
Make sure the data type you are passing to the stored procedure is of the same type as the stored procedure is expecting. Using Visual InterDev's Data Command control to create the Active Server Pages (ASP) code to call your stored procedure will ensure the parameter is of the correct type
lczddd 2000-08-03
  • 打赏
  • 举报
回复
odbc 不支持你的request数据
lzliming 2000-08-02
  • 打赏
  • 举报
回复
我想是你的sql语句,或command设置里,哪个地方没
写对--类型,参数之类。
华南虎哥 2000-08-01
  • 打赏
  • 举报
回复
能看一下你的数据链接源代码吗?

28,390

社区成员

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

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