Subject | RE: [firebird-support] Re: InterBase, Dephi, BDE and Transactions |
---|---|
Author | Helen Borrie |
Post date | 2004-11-18T06:27:56Z |
At 04:14 PM 17/11/2004 -0300, you wrote:
Delphi forum. Several people have warned you about the limitations of
trying to use the BDE with Firebird. That's really where it must end.
Borland runs a large number of Delphi newsgroups on
news://forums.borland.com. You might even be able to locate some in Spanish.
Why don't you search around some of the Delphi support sites for some tech
papers on these topics?
You are very welcome to raise topics related to Firebird and even
InterBase; but please take your Delphi Basics questions elsewhere. I'm
asking you this as moderator of this list.
Thanks.
application and the database. You can't escape from that model using the
BDE. Beneath each session instance a sepeare connection-embedded
transaction combination.
only transaction that the BDE allows you, as a transaction. YOU
CAN'T. The BDE model does not give you access to the transaction, except
through some of its properties and methods that are surface in the
TDatabase. There is NO WAY AROUND THIS. If there were, the world would
not have needed IB Objects, FreeIBPlus, etc.
it is not already started.
started.
into problems if you use it this way --- but this is NOT a Delphi forum, so
I'll let you find out about this for yourself.
CommitUpdates method of the dataset, to reset the cache.
OK. At the moment your code is causing a merry dance for the one and only
transaction.
That ability is not available in DSQL (which is what your applicatiion has
to do). Delphi components use the structures and calls of the API. You
don't have to know the hidden details of that, you only have to know what
you are doing and what are the limitations of this BDE data access layer.
./heLen
>InterBase, Delphi5, BDE and TransactionsThis really has to be your last posting on this subject. This is NOT a
>
>Hello to everybody!
>
> I´m still trying to use InterBase (really it´s FireBird) with Delphi
> 5 and BDE but I still have a problem with Transactions.
>
> I really thanks to every one who suggested me things but
> unfortunately nothing worked.
Delphi forum. Several people have warned you about the limitations of
trying to use the BDE with Firebird. That's really where it must end.
Borland runs a large number of Delphi newsgroups on
news://forums.borland.com. You might even be able to locate some in Spanish.
Why don't you search around some of the Delphi support sites for some tech
papers on these topics?
You are very welcome to raise topics related to Firebird and even
InterBase; but please take your Delphi Basics questions elsewhere. I'm
asking you this as moderator of this list.
Thanks.
> I tried starting a transaction with another Session component but,Of course. A separate session means a separate session between the
> as I supposed, it didn´t worked because each transaction is independent
> of the other (the implicit one made by the BDE and the one I started in
> another Session).
application and the database. You can't escape from that model using the
BDE. Beneath each session instance a sepeare connection-embedded
transaction combination.
> I tried using CachedUpdates but unfortunately, even in this case,What you are doing wrong is assuming that you can access the single and
> the BDE makes an internal transaction and the problem is the same. I
> write here my code in case anybody knows I´m doing something wrong.
only transaction that the BDE allows you, as a transaction. YOU
CAN'T. The BDE model does not give you access to the transaction, except
through some of its properties and methods that are surface in the
TDatabase. There is NO WAY AROUND THIS. If there were, the world would
not have needed IB Objects, FreeIBPlus, etc.
> TablaDeProvincias:=TTable.Create(nil);Only one transaction is allowed. The Open call starts this transaction if
> with TablaDeProvincias do
> begin
> TableName:='Provinc';
> IndexFieldNames:='NOMBRE';
> DataBaseName:=DataBaseGeneral.DataBaseName;
> CachedUpdates:=True;
> Open;
it is not already started.
>{ DataBaseGeneral.StartTransaction;This causes an exception which is swallowed. The transaction is already
started.
>}Edit should be called after Open (or, preferably, on demand, by the user.)
> Edit;
>This is wrong use of the Text property of TField. You are likely to bump
>TStringField(FieldByName('NOMBRE')).Text:='1'+TStringField(FieldByName('NOMBRE')).Text;
into problems if you use it this way --- but this is NOT a Delphi forum, so
I'll let you find out about this for yourself.
> Post;No. ApplyUpdates ***replaces*** Post when you use cached updates.
>{ DataBaseGeneral.RollBack;}
>
> DataBaseGeneral.ApplyUpdates([TablaDeProvincias]);
> Close;No. You call the Commit method of the TDatabase now, followed by the
CommitUpdates method of the dataset, to reset the cache.
> DataBaseGeneral.Connected:=False;Get rid of all the extraneous references to transactions and it will be
> end;
>end.
>
>
>At the line "DataBaseGeneral.ApplyUpdates([TablaDeProvincias]);" I get the
>error message "Nested transactions not supported".
OK. At the moment your code is causing a merry dance for the one and only
transaction.
> I had another idea: starting a transaction directly with an SQL[snip]
> instruction. But I couldn´t do it.
That ability is not available in DSQL (which is what your applicatiion has
to do). Delphi components use the structures and calls of the API. You
don't have to know the hidden details of that, you only have to know what
you are doing and what are the limitations of this BDE data access layer.
./heLen