Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: OO4O and locking records in multiple dynasets

Re: OO4O and locking records in multiple dynasets

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Thu, 23 Dec 2004 15:46:49 +0100
Message-ID: <41cada64$0$31934$626a14ce@news.free.fr>

"Eric Lepage" <nospam_at_ng.com> a écrit dans le message de news:QbAyd.4026$Am2.117730_at_weber.videotron.net...
| Merci Michel,
|
| The BeginTrans / Commit will indeed solve the situation in my posted
| example.
|
| But I've decided to switch the locking strategy to an optimistic
| approach because (and this wasn't clear in my post now that I re-read
| it) the user can open different editing windows, all modeless, and the
| tables are accessed thru a single ODatabase object in memory. So as soon
| as one ODynaset::Update() is done, all other locks are released. This
| situation can't be tracked thru a transactions session.
|
| Eric
|

If i clearly understand, you want to commit the modifications made in one dynaset (with update) without committing the modifications made in another dynaset/window.
But transaction is defined at the session level not at the dynaset level. The only way i see you can do this, is to open a session for each window.

Btw, when you start a transaction with Osession::BeginTrans, ODynaset::Update switches in a mode where it does not commit and release locks. You have to manually manage that with OSession::CommitTrans or OSession::Rollback

Regards
Michel Cadot Received on Thu Dec 23 2004 - 08:46:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US