Subject Re: [IBO] App Errors with IBO and FB1.5
Author rgarbig
Here is the sql and code re: the error ISC 335544332 Invalid
Transaction handle (expecting explicit transaction start)

The application uses the TIB_Session (sesTrs), TIBODatabase (dbTrs)
and TIBOQuery components with implicit transaction control. I use the
TIBODatabase for connecting to FB. Forced writes is true, isolation
is tiCommitted, protocol is TCP/IP, server is localhost.dbTrs session
is sesTrs.
All queries sesion = sesTrs.

//Query settings: ib_Connection: dbTrs, ib_Transaction: default,
// keylinks: resvdt.resvdt_pk, requestlive = False
//commit action = invalidate cursor

//--------------------------------------------------------------------
----------
function fReleaseTime(line_no : Integer; intResvDTPK : integer) :
Integer;
var
rDate : tdatetime;
rcourse, rhole : integer;
rtime, rGroup : string;
begin
//--------------------------------------------------------------------
----------
with dmTRS.qryRelease do begin
close;
sql.clear;
sql.add('update resvdt set lock_field = 0');
sql.add(' where resvdt_pk = ' + inttostr(intResvDTPK));
try
execSQL;
if (rowsaffected <> 1) then begin
WriteLn(MyErrorLog, datetimetostr(now) + ' udbrk 104 -
fReleaseTime: clear Lock_field failed');
WriteLn(MyErrorLog, 'resvdtpk ' + inttostr(intResvdtpk));
end;
except
close;
WriteLn(MyErrorLog, 'udbrk 104 - fReleaseTime: clear Lock_field
exception');
WriteLn(MyErrorLog, 'resvdtpk ' + inttostr(intResvdtpk));
raise;
end;
close;
dmTrs.dbTrs.Commit;
end; // with qryRelease
//--------------------------------------------------------------------
----------
fReleaseTime := 1;
end;

--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 11:02 AM 10/05/2004 +0000, you wrote:
> >I posted this on firebird-suppport but didn't get a response. Sorry
> >if this would be considered a double post but I need the help.
Thanks.
> >
> >Testing my converted app with FB1.5 (originally Paradox then IB)
and
> >IBO 4.3.A. Using TIBO components and implicit transaction control
> >with db commits after inserts and updates. AutoCommit is true.
> >
> >Error 1: "Multiple rows in singleton fetch" The select statement is
> >requesting one row and the key is the primary key field? Keylinks
is
> >the primary key field. What does this mean and what would cause
this?
>
> Show the exact SQL.
>
>
> >Error 2: ISC ERROR CODE:335544332 Invalid transaction handle
> >(expecting explicit transaction start)? from an update query
setting
> >one field to zero with the primary key field as the key.
> >Keylinks is the primary key field.
>
> 1. Show us the SQL of the statement.
> 2. Show us the code that you use to execute the statement.
> 3. Tell us about the ib_connection and ib_transaction settings of
the
> statement objects.
>
> Helen