Subject [IBO] Re: EIB_DatasetError: Dataset to update not found
Author Svein Erling Tysvær
> I have a routine where I'm going through several tables, look for certain fields, change their content / value via a DB-aware control and post the changes.
>
> There is one table where this fails, although several tables before and afterwards work fine.
>
> With this table I'm getting an DatasetError with the message (translated) "Dataset to update not found".
...
>The only way seems to be the usage of another query and an update statement...
>The same block as in the first message, but with this change in the middle:
...
>IBOQuery2.Close;
>IBOQuery2.SQL.Clear;
>IBOQuery2.SQL.Add('update <table with error set myCurrentFieldName = :myCurrentFieldName');
>IBOQuery2.ParamByName(myCurrentFieldName).LoadFromFile(<blob_content_file>, ftBlob);
>IBOQuery2.ExecSQL;
...
>This works apparently, but the error with the other way doesn't cause a good feeling, so a fix would still be good.

Don't you have a WHERE clause in this UPDATE statement? I would expect IBO to try to build an UPDATE statement with a WHERE clause when you try to edit and that this somehow fails. Though I've no clue why it fails.

Set