Subject Re: [firebird-support] Re: InterBase, Dephi, BDE and Transactions
Author Lester Caine
Gustavo wrote:

> I tried using IBX components but they are not as complete as BDE components. TTable doesn't have FindKey, FindNearest, GotoKey, there is no TBatchMove, etc.
>
> Now I just make only one question so I can try a new idea. I want to start a transaction directly with an SQL instruction executing the following code:
>
> with TQuery.Create(nil) do
> begin
> DataBaseName:=DataBaseGeneral.DataBaseName;
> SQL.Clear;
> { SQL.Add('SET TRANSACTION NO WAIT ISOLATION LEVEL READ COMMITTED NO RECORD_VERSION');}
> SQL.Add('SET TRANSACTION');
> ExecSQL;
> Free;
> end;
>
> But at the instruction "ExecSQL" I get an error message "General SQL Error. invalid transaction handle (expecting explicit transaction start)".
>
> I tried with the instruction "SQL.Add('SET TRANSACTION');" or with the other one that is commented.
>
> Can anybody tell me what4s wrong in what I4m doing?

Gustavo - ExecSQL does not know WHAT you are going to do in the SQL so
the first thing IT does is create the transaction. It's years since I
used BDE, but I am fairly certain that you can not get round that fact.
You need an interface that talks directly to the database - which BDE
never did.

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services