Subject | Re: [firebird-support] InterBase, Dephi, BDE and Transactions |
---|---|
Author | David Johnson |
Post date | 2004-11-16T02:30:18Z |
First, throw out the BDE. It was a nice piece of work by some very
talented people, but it is based on direct ISAM access at the file
level. The ISAM table approach, and the relational database approach
are really in direct opposition to each other. With market pressures
leaving ISAM technolog at a dead end about a decade back, there is talk
of phasing out the BDE. (Of course there is always talk of phasing out
the BDE, and I'll believe it when I see it.)
With Firebird, if you must use anything other than the native API, IBO
appears to be the best I have found so far. It is the least BDE like of
the options out there, but it is the only one that passed my reliability
testing requirements, and it performed decently too.
talented people, but it is based on direct ISAM access at the file
level. The ISAM table approach, and the relational database approach
are really in direct opposition to each other. With market pressures
leaving ISAM technolog at a dead end about a decade back, there is talk
of phasing out the BDE. (Of course there is always talk of phasing out
the BDE, and I'll believe it when I see it.)
With Firebird, if you must use anything other than the native API, IBO
appears to be the best I have found so far. It is the least BDE like of
the options out there, but it is the only one that passed my reliability
testing requirements, and it performed decently too.
On Mon, 2004-11-15 at 13:11, gstv_m wrote:
>
>
>
> Hello to everybody!
>
> I´m trying to use InterBase (really it´s FireBird) with Delphi
> 5 and BDE but I have a problem with Transactions.
>
> I want to manage my DataBase editing with explicit transactions
> (using DataBase.StartTransaction, Commit and RollBack) but I have
> conflicts with what I think is an implicit transaction that BDE
> makes each time I make a Table.Post. In the example code below, I
> connect to a DataBase, I open a Table, start a transaction, edit a
> Field, and when I try to Post the record, I get the error "Nested
> transactions not supported".
>
> I tried to change the settings of BDE with the BDE
> Administrator but I couldn´t make it work. I tried with SQLPASSTHRU
> MODE = SHARED NOAUTOCOMMIT or SHARED AUTOCOMMIT or NOT SHARED, I
> connected to the DataBase using an Alias or not using an Alias, I
> tried with SQLQRYMODE null or SERVER, with COMMIT RETAIN FALSE or
> TRUE, etc. None of this worked!!!
>
> Does anybody knows what can I do with this?
>
> Gustavo
> gusm@...
>
>
> Example code in Delphi 5:
>
>
> unit Unit1;
>
> interface
>
> uses
> DB,
> DBTables,
>
> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
> Dialogs;
>
> implementation
>
> var
> DataBaseGeneral : TDataBase;
> TablaDeProvincias: TTable;
> begin
> DataBaseGeneral:=TDataBase.Create(nil);
> with DataBaseGeneral do
> begin
> DataBaseName:='General';
> DriverName:='INTRBASE';
> Params.Values['SERVER NAME']:='General.GDB';
> Params.Values['USER NAME']:='SYSDBA';
> Params.Values['PASSWORD']:='masterkey';
> LoginPrompt:=False;
> Connected:=True;
> end;
>
> TablaDeProvincias:=TTable.Create(nil);
> with TablaDeProvincias do
> begin
> TableName:='Provinc';
> IndexFieldNames:='NOMBRE';
> DataBaseName:=DataBaseGeneral.DataBaseName;
> Open;
>
> DataBaseGeneral.StartTransaction;
> Edit;
> TStringField(FieldByName('NOMBRE')).Text:='1'+TStringField
> (FieldByName('NOMBRE')).Text;
> Post;
> DataBaseGeneral.Commit;
>
> Close;
> DataBaseGeneral.Connected:=False;
> end;
> end.
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>