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: Checking for uncommited transactions

Re: Checking for uncommited transactions

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 10 Mar 2003 05:18:50 -0800
Message-ID: <1a75df45.0303100518.65f6e850@posting.google.com>


"FC" <flavio_at_tin.it> wrote :

> Hang on a minute, one can design a screen that contains two forms in two
> different tabs.
> This screen is a "logical" unit, so, switching from one tab to the other
> doesn't mean you have to commit or rollback. You can defer the commit or
> rollback until you exit from the "main" screen.

That is not really an issue. You are dealing with a SQL dataset object. The object's methods and properties are visible from any "piece" of code, as long as that object is global, or within the scope of that code.

Thus, the object is accessible from the "tabbed code", the form's destructor, or the form's OnClick event for the exit menu object.

You simply need to decide what to handle where and when. Good programming technique dictates to modularise and not write redudant code. Thus, you should have a single piece of code that deals with the SQL dataset being committed or rolled back.

It makes a lot of sense to have this code as part and parcel of that object - i.e. it should be part of the class of that object.

> Well, in the reality my original question was regarding this point.
> Can I write a generic function returning a flag indicating whether there are
> uncommitted data so that I can ask the user if he wants to commit or
> rollback prior to quit?

Yes you can. But you do not need Oracle for it. The SQL dataset class should surely know whether or not it has uncommitted (outstanding) transactions. If it does not have such a property, well then subclass it and add one!

As I said - this is a program design and coding issue. Nothing to do with Oracle.

However, seeing that you're deal with something like Visual Basic that sucks when it comes to OO programming..no wonder you're confused.

Bottom line. Good OO design is crucial. Being able to subclass is crucial as this will allow you to extend the class's behaviour and expose methods and properties you need for meaningfully handling your requirements.

Do not confuse Visual Basic lack of Object Orientation support and sh*tty classes (all COM based) as a problem with Oracle.

--
Billy
Received on Mon Mar 10 2003 - 07:18:50 CST

Original text of this message

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