Leszek Gawron wrote: >I'm quite new to JDBC and ESQL. My question is: I have more that one database >inserts. Every one in different esql:execute tag. How can I rollback the >transaction if say the 3rd goes wrong? There is no such esql tag and I do not >know how to obtain the appropriate jdbc session variable? or maybe I'm totally >wrong? > ouzo > > Open the new connection like: <esql:connection> <esql:driver>mydriver</esql:driver> <esql:dburl>dburl</esql:dburl> <esql:username>... </esql:username> <esql:password>...</esql:password>
And set <esql:autocommit>false</esql:autocommit> in your connection. Now you can use following syntax to commit or rollback changes: <esql:execute-query> ... put your query here </esql:execute-query> <esql:execute-query><esql:query>commit (or rollback) </esql:query></esql:execute-query> </esql:connecton> May be that example solve your problem :) (Because I doesn't try this method in my work) Regards. Yury. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>