'Record not found' error

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ccmcbride
Posts: 101
Joined: Tue 01 May 2007 16:36

'Record not found' error

Post by ccmcbride » Mon 04 Jun 2007 22:47

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).

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 05 Jun 2007 07:24

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).

ccmcbride
Posts: 101
Joined: Tue 01 May 2007 16:36

Post by ccmcbride » Tue 05 Jun 2007 16:44

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;

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 06 Jun 2007 12:29

Thank you for your test sample you sent us by email. Investigation of the problem is in progress.

Post Reply