[freetds] Transaction weirdness
John Anderson
ardour at semiosix.com
Thu Oct 9 13:05:33 EDT 2003
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
More information about the FreeTDS
mailing list