You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Learning apr <le...@hotmail.co.uk> on 2007/11/19 13:38:53 UTC

cannot commit - no transaction is active



I use the function:

apr_dbd_transaction_start(driver, pool, sql,&transaction);

to start a transaction.



But when I close this transaction with the function:

apr_dbd_transaction_end(driver, pool, transaction);



It always gives the error message:



cannot commit - no transaction is active



What is the reason?
I also ended a transaction immediately after I started it without doing any operation. I still got this error:
cannot commit - no transaction is activeWnat is the reason and how can I correct it?Your help will be greatly appreciated!






_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE

Re: cannot commit - no transaction is active

Posted by Bojan Smojver <bo...@rexursive.com>.
On Mon, 2007-11-19 at 20:38 +0800, Learning apr wrote:
> I use the function:
> apr_dbd_transaction_start(driver, pool, sql,&transaction);
> to start a transaction.
> 
> But when I close this transaction with the function:
> apr_dbd_transaction_end(driver, pool, transaction);
> 
> It always gives the error message:
> 
> cannot commit - no transaction is active
> 
> What is the reason?

Hard to say without knowing what driver you're using.

Anyhow, you can always run you code through a debugger and stop to see
what actually happens when you attempt to start/end transaction.

-- 
Bojan