Skip to Content.
Sympa Menu

freetds - Re: [freetds] Transaction weirdness

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: John Anderson <ardour AT semiosix.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Transaction weirdness
  • Date: Thu, 09 Oct 2003 12:05:33 -0000

On Thu, 2003-10-09 at 02:40, James K. Lowden wrote:
> On 08 Oct 2003 21:51:07 +0200, John Anderson <panic AT semiosix.com> wrote:
> >
> > I'm doing a transaction that contains one select statement with
> > associated data retrieval and then a stored procedure execute
> > statement.
> > Committing the transaction using either SQLTransact or
> > SQLEndTran fails with
> >
> > Error: 0, SQLState: S1000, [FreeTDS][SQL Server]Could not
> > perform COMMIT or ROLLBACK
>
> You seem to be missing an earlier error. In the log:

I've spent about 1/2 the day digging for this. Turns out the stored
procedure call returns 2 separate result sets, one of which has nothing
but a rowcount value in it. I'm only interested in the other resultset.

So my code processes the data (1 row) that it needs, and then tries to
execute the commit. Since the other (useless) resultset is still
pending, the commit attempt fails.

Seems to me that from an application point of view it would make sense
for a commit attempt to automatically cancel any pending result sets?

bye
John






Archive powered by MHonArc 2.6.24.

Top of Page