|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 25, 2008 4:22 AM
Points: 3,
Visits: 11
|
|
Hi
I am having a randomly recurring problem where I get the error message:
"Could not find prepared statement with handle xx"
where xx is a number.
The problem occurs randomly and can be solved just by forcing a dummy change in my SQL (such as a new line break) and re-running it, with no SQL changes.
Does anyone have any ideas on what could cause this?
Thanks!
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Friday, April 05, 2013 4:43 PM
Points: 1,473,
Visits: 1,314
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 25, 2008 4:22 AM
Points: 3,
Visits: 11
|
|
It a Java app, although that is hidden from my interface, where I am writing just the SQL and submitting it. The full message I get is:
sql: java.sql.SQLException: Could not find prepared statement with handle 1.
...but I don't get the java stack dump (maybe its hidden from my application).
Not sure about the concurrent server user limit - it should be high.
What is actually happening on SQL Server when I use (or at least the Java ODBC driver uses) prepared statements? I would guess that on first execution, the statement is prepared and executed. On subsequent executions, a handle is used to point to the prepared statement, and therefore only the execution actually takes place (instead of prepare & execute). Could anybody confirm that is how it should work?
Thanks!
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Friday, April 05, 2013 4:43 PM
Points: 1,473,
Visits: 1,314
|
|
| You can cooperate with your DBA to check the version of your SQL Server, and its setting of max connections.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 25, 2008 4:22 AM
Points: 3,
Visits: 11
|
|
| We have SQL Server 2000 and maxActive is set to 20 for our connection.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, February 27, 2012 6:52 AM
Points: 1,
Visits: 9
|
|
Check out microsoft ADO.NET 2.0 hotfix in this link, it appears to be related to your problem: http://support.microsoft.com/kb/913765
|
|
|
|