TQuery doesn't commit

I'm doing some simple inserts and deletes with D3  in Interbase. I use a TTable
to do the inserts and a TQuery to do the deletes. They work fine with local
Interbase when no other sessions are open.

But in a concurrency test. I used ISQL to do an insert to one of these tables
but then did not commit the insert. Instead, I started my app to do a couple of
inserts and deletes from the app (I use a local session component and local
alias) to see what effect the ISQL open transaction would have.

First of all, when I tried to fetch the data from the table (with a TTable) I
got all the data that was committed prior to the ISQL transaction but I also got
a deadlock message (TTable set to readcommitted). Don't know where that message
came from or how to handle it. The displayed data was fine.

Then I added a new record (TTable), committed it, then rolled the ISQL back.
Then from ISQL, I selected all from the table. The ISQL insert was not there
(correct) and the new record from the app was there (also correct).

But when I tried to delete a row using a TQuery, committed it and then rolled
ISQL back, the ISQL insert was not there (correct) but the record deleted by the
TQuery was still there (NOT correct).

The following is the code that deleted the record. This code did not produce an
error message. Also this code works properly when ISQL is not in the middle of a
transaction.

Does anyone know what's going on here?

TIA

Phil Cain

procedure TdmDataMain.DoDMLSQL(SQLStatement, MsgFrag: string);
begin
   DBMain.StartTransAction;
   try
        with qGen do
        begin
           if Active then Close;
           SQL.Clear;
           SQL.Add(SQLStatement);
           ExecSQL;
           DBMain.Commit;
           end;
   except
        on E:EDatabaseError do
        begin
           ShowMessage(MsgFrag + ' Error: ' + E.Message);
           DBMain.Rollback;
           end;
   end;
end;