简体   繁体   English

ODBC驱动程序常规错误:尝试了两个活动数据库请求

[英]ODBC Driver General error: attempted two active database requests

I'm using ASP.NET 2.0 to connect to a Sybase SQL Anywhere 5 server. 我正在使用ASP.NET 2.0连接到Sybase SQL Anywhere 5服务器。 And I get this error sporadically. 而且我偶尔会收到此错误。 It just happens sometimes. 有时会发生。 The error message is: 错误消息是:

ERROR [HY000] [Sybase][ODBC Driver]General error: attempted two active database requests 错误[HY000] [Sybase] [ODBC驱动程序]常规错误:尝试了两个活动数据库请求

Exception Details: System.Data.Odbc.OdbcException: ERROR [HY000] [Sybase][ODBC Driver] 异常详细信息:System.Data.Odbc.OdbcException:错误[HY000] [Sybase] [ODBC驱动程序]

General error: attempted two active database requests 常规错误:尝试了两个活动数据库请求

Anyone has any experience with this problem? 任何人都有这个问题的经验吗?

The error message means that you attempted to run two queries at the same time using the same database connection. 该错误消息表示您尝试使用相同的数据库连接同时运行两个查询。

Are you trying to use the same database connection for all requests? 您是否要对所有请求使用相同的数据库连接? The requests are handled by several threads, so each request needs to have it's own database connection. 这些请求由多个线程处理,因此每个请求都需要具有自己的数据库连接。

Sounds like you're reusing the same connection for multiple commands. 听起来您正在对多个命令重新使用同一连接。 Check that you properly dispose of the connections after each command/batch of commands and that all new commands get a new connection. 在每个命令/命令批处理之后检查是否正确处理了连接,并且所有新命令都获得了新连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM