Subject | Re: [IBO] BLOB is not refreshing |
---|---|
Author | Helen Borrie |
Post date | 2005-04-29T12:42:58Z |
At 11:15 AM 29/04/2005 +0200, you wrote:
experiments, I found that the Cancel method is failing to relink the DBMemo
with the dataset. This succeeds, though, i.e. it has the same effect as
scrolling the thumb of the DBGrid to the bottom:
procedure TForm1.Button3Click(Sender: TObject);
begin
IBOQuery1.Cancel;
IBOQuery1.Last; // re-engages the interface with the dataset
DBGrid1.SetFocus;
end;
Still, I think this behaviour is wrong. The Cancel method should take care
of re-engaging the DBMemo.
calling Last or by scrolling to top/bottom. However, I think that has more
to do with the fact that the set has no KeyLinks. In IBO terms, it's not
an updatable set.
If you are interested, you could explore further (with the native
components), by altering the SQL so that the PK is in the set, KeyLinks are
properly set and the PK for the Insert (i.e. Append) is taken care of with
a generator and GeneratorLinks.
Helen
>but in my previous e-mail, it was only simple example. In fact, I haveOK, this demo shows clearly what you are talking about. After some
>IBOQuery, DBGrid, DBMemo and I am editing text in DBMemo component. I call
>IBOQuery.Append, then I write something into DBMemo, then I call
>IBOQuery.Cancel and then, when I am scrolling DBGrid, attached DBMemo
>shows still the text, that I wrote into DBMemo.
>Here is the small test application http://usti.medisoft.cz/Test/TestBlob.zip
>If you want, try it. After you run this application, click on the Open
>button, then click on the Append button, then write something into DBMemo,
>then click on the Cancel button and then scroll DBGrid.
experiments, I found that the Cancel method is failing to relink the DBMemo
with the dataset. This succeeds, though, i.e. it has the same effect as
scrolling the thumb of the DBGrid to the bottom:
procedure TForm1.Button3Click(Sender: TObject);
begin
IBOQuery1.Cancel;
IBOQuery1.Last; // re-engages the interface with the dataset
DBGrid1.SetFocus;
end;
Still, I think this behaviour is wrong. The Cancel method should take care
of re-engaging the DBMemo.
>I tried it also with "native IBO" components (IB_Query, IB_Memo etc.) andI got a different result with native components, not correctable either by
>the result was the same.
calling Last or by scrolling to top/bottom. However, I think that has more
to do with the fact that the set has no KeyLinks. In IBO terms, it's not
an updatable set.
If you are interested, you could explore further (with the native
components), by altering the SQL so that the PK is in the set, KeyLinks are
properly set and the PK for the Insert (i.e. Append) is taken care of with
a generator and GeneratorLinks.
Helen