Skip to Content.
Sympa Menu

freetds - Re: [freetds] Exececute procedure returns errors

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Exececute procedure returns errors
  • Date: Mon, 26 Jul 2004 22:42:50 -0400

On Mon, 26 Jul 2004 David Keith <dkeith AT logisticshealth.com> wrote:
> I've been trying to track down a problem between Kylix, ODBCExpress,
> AstaIO, unixODBC, freeTDS and MS SQL 2K. Looks like freeTDS may be the
> culprit, although I'm not completly certain. I'm attempting to execute
> a stored procedure that has input params and returns one output param.
> If I don't explicitly start/commit/end the transaction, I get an error,
> here's a snippet from the freetds.log:
...
> tds_submit_query(): state is PENDING
> 17:34:17.419652 tds_client_msg: #20019: "Attempt to initiate a new SQL
> Server operation with results pending.". Connection state is now 1.
...
> What's strange is that if I start up a single user app that has the
> ODBCExpress components on the app, and only uses one session, I can get
> this to work. If I try to execute the storedproc via a threaded session
> in my AstaIO daemon, I get the above errors.

A little more of the above log might help. I'd suspect two threads
sharing a connection. As far as the server's concerned, there are no
threads. There are only connections, and each connection must finish
reading its results before initiating another query. Two threads not
cooperating in their use of a connection could result in the 20019 error.


--jkl




Archive powered by MHonArc 2.6.24.

Top of Page