Problem with C-API and multithreading

General discussion forum about all databases other than SqlBase.

Problem with C-API and multithreading

Post by knudsole » 08 Aug 2013, 08:51

I have a problem when attempting to create a multithreaded application that connects to SQL Server using the Centura C-API.
The code is simple
Thread 1 Select on connection 1 The following steps has happened Compile, bind , execute fetch as started.
Thread 2 Select on connection 2 The following steps has happened Compile, bind , attempting to execute results in the following error ID 20055 informing me that the ODBC connection is busy with the result from another statement.

I got the following info from Microsoft support.

Former issue definition:
Scenario: Lookup based on a key value.
Issue: The error is thrown almost immediately
- Error: 20055 - Connection is busy with another hstmt.
Apparently Centura/Gupta/SQLWindows/Unify uses the same connection but changes its context with each new SQLConnect statement.
Trying to simultaneously execute a second query on the same connection that currently has an asynchronous query executing will cause the error

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests