BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to use database.executeStatement in a transaction

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Databases
View previous topic :: View next topic  
Author Message
kei
Guest





PostPosted: Thu Jun 22, 2006 8:12 am    Post subject: how to use database.executeStatement in a transaction Reply with quote



as caption, I know there is a method saveChanges(DataSet
[] dataSets, boolean doTransactions) for saving QueryDataSet in
a transaction, but is there a method to include database.executeStatement in a transaction?
what I want to do is delete some record in a table, then add
some record in a table, but these two action must be in a transaction, that is, both success or both fail, how to do?

Thx!!
Back to top
John Moore (TeamB)
Guest





PostPosted: Fri Jun 23, 2006 11:02 pm    Post subject: Re: how to use database.executeStatement in a transaction Reply with quote



kei wrote:
Quote:
as caption, I know there is a method saveChanges(DataSet
[] dataSets, boolean doTransactions) for saving QueryDataSet in
a transaction, but is there a method to include database.executeStatement in a transaction?
what I want to do is delete some record in a table, then add
some record in a table, but these two action must be in a transaction, that is, both success or both fail, how to do?

Thx!!

Have you tried

database.setAutoCommit(false);

....etc...

--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
http://www.microps.com/mps/paperFAQ.html
====================================================
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.