Subject Deadlock issue
Author Robert martin
Hi

I am getting a deadlock (sometimes) when I run the following code.


ItemTypeQuery.Active := False;
ItemTypeQuery.ParamByName('ItemRef').AsFloat :=
FieldByName('ItemRef').AsFloat;
ItemTypeQuery.ParamByName('RegionRef').AsFloat :=
FieldByName('SourceReg').AsFloat;
ItemTypeQuery.Active := True;


The strange thing is that I have traced through the code and this code
is not even required. ItemtypeQuery is already open and chowing the
correct (same) details that this query should show. So in essence I am
closing and re opening a query and getting a deadlock.

ItemTypeQuery calls a stored procedure that returns the results. It
runs in a readonly transaction in tiCommitted isolation level. The
query itself is also marked as read only. The query providing data for
the parameters is not being edited.


Any ideas anyone ?

--
Rob Martin
Software Engineer

phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com

Wild Software Ltd