Subject Re: [Firebird-Java] rollback
Author David Jencks
I don't think you can get rollback retaining or commit retaining. As I
recall these are only available as operations rather than modifying the
transaction parameter block settings? There is access to the tpb, although
it wasn't too easy to get to the last time I looked.

david jencks

On 2002.06.05 23:27:57 -0400 Benny Setiawan Tanua wrote:
> Dear All,
>
> Does the Firebird JDBC driver provide support for rollback retaining?
> because i use rollback function but it's not work fine.
>
> try
> {
> con.setAutoCommit(false);
>
> if (vPrepare != null && vPrepare.size() > 0)
> {
> int rresult = 0;
>
> for (int i = 0; i < vPrepare.size(); i++)
> {
> count = i;
> rresult =
> (( PreparedStatement )
> vPrepare.get(i)).executeUpdate();
> result += rresult;
> }
> }
> if (result == vPrepare.size()){
> iReturn = 1;
> con.commit();
> con.setAutoCommit(true);
> }else{
> iReturn = 0;
> con.rollback();
> con.setAutoCommit(true);
> }
> }
> catch (SQLException e)
> {
> try
> {
> iReturn = 0;
> con.rollback();
> con.setAutoCommit(true);
> }
> catch (SQLException re)
> {
> }
> }
> finally
> {
> vPrepare = null;
> vQuery = null;
>
> poolManager.returnConnection(dataBase, con);
> }
>
> Thanks and Regards,
> Benny Setiawan T
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>