Subject | Re: [IBO] Transaction Control |
---|---|
Author | Helen Borrie |
Post date | 2003-11-12T02:47:05Z |
At 07:43 PM 12/11/2003 -0500, you wrote:
IB/Fb happens inside a transaction. So the SELECT statement gets prepared
the first time you open the dataset. The transaction has to start before
Prepare can happen, and IBO takes care of that if you are not controlling
transactions explicitly.
I guess if you're not used to transactions, you're currently at the "one
transaction per connection" place and it will be TIBODatabase's embedded
transaction you are using. It doesn't have to be: you can use a
TIBOTransaction for the default transaction if you prefer; and you can
have multiple transactions.
"Edit" is a client-side thing. When you call Edit on a dataset, you're
asking the component to set things up so that the current row in the buffer
is going to be (or likely to be) updated. Edit does nothing on the server
at all. But any changes you are going to do are going to be in the
*current* transaction context. So you see that the idea that "IBO starts a
Transaction automatically when you edit data in a IBODataaset" is a
mistake. (IBO isn't different to IBX or the BDE in this respect.)
database of about 1800 IBO list topics distilled into short Q & A articles,
with keyword searching (yah, I wrote it...)
Helen
>Helen Borrie wrote:No, I think you don't understand what a transaction is/does. Everything in
> > At 06:02 PM 12/11/2003 -0500, you wrote:
> >
> >
> >>OK, been reading some more and I may be getting confused between the
> >>native IBO comps and the TIBODataset stuff. I want to try and emulate
> >>the IBX methodology as much as possible to support my current apps and
> >>way of doing things.
> >
> >
> > What is there about IBX that you want to emulate?
> >
> >
> >
> >>I'm not quite yet understanding how Transactions work with IBODataset
> >>group, mostly in the area of how they start transactions automatically.
> >> Other that, are there any other major differences in how transactions
> >>are performed in IBO?
> >
> >
> > Differences from IBX? yes, many, many. IBO fully supports the IB/FB
> > transaction model, IBX doesn't. People tend to use a lot of workarounds
> > with IBX to get where they need to go - such as clientdatasets and caching
> > to get a receptive client-side view of sets. In IBO you don't need the
> > workarounds, because the components implement what's required, without
> them.
> >
>
>Thanks Helen, should have been more clear (note to self: Never post
>directly after taking a nap).
>
>Basically, I want to confirm that IBO starts a Transaction automatically
>when you edit data in a IBODataaset, is that correct?
IB/Fb happens inside a transaction. So the SELECT statement gets prepared
the first time you open the dataset. The transaction has to start before
Prepare can happen, and IBO takes care of that if you are not controlling
transactions explicitly.
I guess if you're not used to transactions, you're currently at the "one
transaction per connection" place and it will be TIBODatabase's embedded
transaction you are using. It doesn't have to be: you can use a
TIBOTransaction for the default transaction if you prefer; and you can
have multiple transactions.
"Edit" is a client-side thing. When you call Edit on a dataset, you're
asking the component to set things up so that the current row in the buffer
is going to be (or likely to be) updated. Edit does nothing on the server
at all. But any changes you are going to do are going to be in the
*current* transaction context. So you see that the idea that "IBO starts a
Transaction automatically when you edit data in a IBODataaset" is a
mistake. (IBO isn't different to IBX or the BDE in this respect.)
>Is this list archived somewhere (like fasttextsearch.com)?Yes: at news://news.atkin.com. The on-line FAQ is also a Firebird
database of about 1800 IBO list topics distilled into short Q & A articles,
with keyword searching (yah, I wrote it...)
>BTW, Helen, you're everywhere!Tell me about it. :(
Helen