Re: Esql and rollback

2002-07-24 Thread yuryx

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:

 mydriver
 dburl
 ... 
 ...

And set false in your connection.

Now you can use following syntax to commit or rollback changes:


 ... put your query here

commit (or rollback) 



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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Esql and rollback

2002-07-23 Thread Christian Haul

On 23.Jul.2002 -- 09:25 AM, 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?

Set connection to autocommit false, start transaction with "begin
transaction" and do "rollback work" or "commit work" as
appropriate. The above depends on your DBMS and various DBMS
settings.

There has been a post regarding esql and autocommit recently, but I've
just returned from a short vaccation and haven't looked at this (and
other) issues, yet.

Chris.
-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Esql and rollback

2002-07-23 Thread Leszek Gawron

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
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>