Subject RE: [IBO] App Errors with IBO and FB1.5
Author Jason Wharton
This suggests your dataset is connected to a transaction that is not
connected to the database the dataset is connected to. You have more than
likely failed to assign both the IB_Transaction and IB_Connection properties
explicitly.

Jason Wharton
www.ibobjects.com

-----Original Message-----
From: rgarbig [mailto:ross@...]
Sent: Monday, May 10, 2004 8:43 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] App Errors with IBO and FB1.5


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;