Page 1 of 1

'Record not found' error

Posted: Mon 04 Jun 2007 22:47
by ccmcbride
Scenario:
I have a master detail link between inventory and inventory detail.
I add a filter to my inventory details.
I get a 'record not found' error, though 1 record should have been returned (it's in the data).

Posted: Tue 05 Jun 2007 07:24
by Antaeus
In what moment does the problem arise: on setting the filter, refreshing a record, editing a record, etc?
What kind of filter do you use: filter on the client side (using Filter and Filtered properties), or filter on the server side (using an additional condition in your query, or using the AddWhere method).

Posted: Tue 05 Jun 2007 16:44
by ccmcbride
My code:
if tblInvenDetail.MasterSource dsInventory then
begin
tblInvenDetail.MasterSource := nil;
if tblInvenDetail.DetailFields 'ItemUID' then
tblInvenDetail.DetailFields := 'ItemUID';
tblInvenDetail.MasterFields := 'UID';
tblInvenDetail.MasterSource := dsInventory;
end;
isFound := false;
if aUID '' then
begin
tblInvenDetail.Filter := 'UID = ' + quotedStr(aUID);
tblInvenDetail.Filtered := true;
TableOpen(tblInvenDetail); ---> blow up.
IsFound := not tblInvenDetail.IsEmpty;
end;

Posted: Wed 06 Jun 2007 12:29
by Antaeus
Thank you for your test sample you sent us by email. Investigation of the problem is in progress.