Skip to Content.
Sympa Menu

freetds - Re: [freetds] Problem when the SQLExecute failed

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ou liu" <ou AT qbt.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Problem when the SQLExecute failed
  • Date: Tue, 30 Nov 2004 09:49:12 -0500

I am looking to fix the FreeTDS code because I don't think the SQLFreeHandle
should return an error of

07005 [FreeTDS][SQL Server]Attempt to initiate a new SQL Server operation
with results pending



I am using an object to encapsulate the statement handle; the statement
handle should be freed as soon as the object is destructed. (Otherwise the
resource losed)



Now the client who is using my object will delete it as soon as he found
that the query failed and then recreate a new object and tried to query
again.



So my first problem is how I can free the statement handle if SQLFreeHandle
call will fail.



I will try to reproduce the "Write to SQL server failed" today following
your suggestion.



Another problem is about the freeze of our application. I am not 100 percent
sure that the problem was in FreeTDS. But I guess it was because

1. Somebody met the same freeze problem before when the database
connection is down.

2. Before the freeze happened, our application was doing nothing
except the log files showing that database connection had been up and down
for several times.

3. We have many threads in our application, some of them are not
related with each other at all. So the freeze was very unlikely due to a
deadlock in our code, although I can not say for sure that it was not our
problem.

Did anybody meet such kind of problem before? Is there any API on Solaris to
freeze all threads in the application?



Regards

Ou







Archive powered by MHonArc 2.6.24.

Top of Page