Subject Re: [IBO] Record was not located to delete
Author Helen Borrie
At 10:19 PM 19/10/2004 +0000, Jackie wrote:
> I have a DB aware grid showing
>a bunch of records. When I change some fields of a record in the grid
>and click my delete button, I do the following,
>
>HolDBView->DataController->DataSource->DataSet->Delete();
>
>I get an exception that says "Record was not located to delete.". It
>seems to me the delete requires all fields match.

Delete requires only to be able to find the KeyLinks fields that uniquely
identify the record. If KeyLinksAutoDefine is true, IBO can usually find
the keylinks itself, provided the primary key is in the dataset and the
query involves only one table.

If the Keylinks are wrong, it can then only seek the record by using all of
the fields.

>Shouldn't IBO just use the PK to locate a record and delete it? What I
>need to do for this problem?

Send the SQL for the query, the columns that you have assigned as KeyLinks,
and also tell us what is the purpose of this:

"When I change some fields of a record...."

What is the purpose of changing fields in a record you are about to delete?

Helen