Subject | Re: EIB_DatasetError: Dataset to update not found |
---|---|
Author | patrick_marten |
Post date | 2012-07-16T12:18:28Z |
Yes, ID is defined as a primary key. KeyLinksAutoDefineis set to true, Requestlive is set to true and ReadOnly to false.
If I explicitly set KeyLinks to ID it works without problems!
No idea though, why it works for all other tables without KeyLinks and only this one doesn't work. Could foreign key be a problem? That's the only difference I can see.
Many thanks for your help!
Best regards,
Patrick
If I explicitly set KeyLinks to ID it works without problems!
No idea though, why it works for all other tables without KeyLinks and only this one doesn't work. Could foreign key be a problem? That's the only difference I can see.
Many thanks for your help!
Best regards,
Patrick
--- In IBObjects@yahoogroups.com, Svein Erling Tysvær <svein.erling.tysvaer@...> wrote:
>
> >IBOQuery2.Close;
> >IBOQuery2.SQL.Clear;
> >IBOQuery2.SQL.Add('update <table with error set myCurrentFieldName = :myCurrentFieldName'); >IBOQuery2.SQL.Add('where ID = ' + IntToStr(IBOQuery1.FieldByName('ID').AsInteger));
> >IBOQuery2.ParamByName(myCurrentFieldName).LoadFromFile(<blob_content_file>, ftBlob); IBOQuery2.ExecSQL;
> >
> >And it works without any problems.
>
> Is ID defined as a Primary key? If so, IBO would normally figure out the required UPDATE statement (provided KeyLinksAutoDefine hasn't been set to false and KeyLinks is empty - I assume RequestLive is true and ReadOnly false). What if you explicitly set KeyLinks to ID, do the error still prevail?
>
> I take it this is a 'standalone dataset', i.e. that DataSource doesn't have a value (I don't use TIBOQuery myself, and don't know if this could have an effect if you e.g. changed values for IBOQuery2 which was pointed to by DataSource1, which in turn was the DataSource of IBOQuery1)
>
> Set
>