简体   繁体   中英

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. 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

Exception Details: System.Data.Odbc.OdbcException: ERROR [HY000] [Sybase][ODBC Driver]

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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