1
votes

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?

2

2 Answers

0
votes

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.

0
votes

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.