"Blob not opened" error?

Hi,

We have an application that is using a OleContainer to display the contain of
an OLE blob field.  The user can doubleclick on the OleContainer and modify it,
and we've set up an OnExit event for the container so that it will save its
content back to the appropriate table/field.  The following code is the one
that does this:

procedure TWire.TVOleContainer2Exit(Sender: TObject);
var
  Stream1 : Tstream;
begin
  with DesignDataModule.designTable do
    begin
    edit;
    Stream1 := CreateBlobStream(FieldByName('TerminalViewOLE2'), bmReadWrite);
    TVOleContainer2.SaveToStream(Stream1);
    post;
    Stream1.Free;
    end;
end;

This code works the first time, but not the second time.  Basically, we click
on the OleContainer, then click on any other control.  Fine.  We then click
again on the OleContainer so that it gets focus, and then when we try to click
on any other control, it's OnExit event generates the "Blob not opened" error.

Why?

Denis
Aquarius Creations
dsarra...@{*word*104}us.ca
http://www.{*word*104}us.ca/~dsarrazin/Homepage1.html