🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.database
Article #203

how to use database.executeStatement in a transaction

#203
From: kei
Date: Thu, 22 Jun 2006 03:54
8 lines
1247 bytes
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!!
Technical Details
Message-ID: <449a1470$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!news-out.newsgroups.com!sp6iad.superfeed.net!in1.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,5919d00e4a621fdd,start
X-Google-Attributes: gid1073da,public
X-Google-Language: ENGLISH,ASCII
Subject: how to use database.executeStatement in a transaction
From: "kei" <kei@oslhk.com>
Date: 21 Jun 2006 20:54:24 -0700
Message-ID: <449a1470$1@newsgroups.borland.com>
Lines: 8
NNTP-Posting-Host: 207.105.83.66
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!news-out.newsgroups.com!sp6iad.superfeed.net!in1.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
Newsgroups: borland.public.jbuilder.database
X-Trace: newsgroups.borland.com 1150948464 207.105.83.66 (21 Jun 2006 20:54:24 -0700)
Reply-to: "kei" <kei@oslhk.com>
Sender: "kei" <kei@oslhk.com>
X-User-Info: 218.189.141.58