Saving to BLOB field in dbExpress with a join

Writing to and from Interbase BLOB fields in Delphi7 like this….

ClientDataset.FieldByName(‘NOTES’).AsString:=Memo.Text; fine until the underlying dataset is a join and the fields need to be written explicitly to the joined tables by the providers BeforeUpdateRecord event.
Building SQL statements in this event from the fields to be updated works for non-blob field but doesn’t work for BLOB fields as there is no INSERT syntax allowable for BLOB fields.
The question is therefore what should the providers BeforeUpdateRecord event look like to handle this kind of field? Is it possible to do it this way or is there another way?
A solution involving the datasets provider is preferable as this nicely encapsulates updates to all affected tables.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RogerFroudAuthor Commented:
This solution seems to work ok but is a bit clumsy. Any better solution gets the points....

Dataset Provider BeforeUpdateRecord event
    SQL: String;
    myParams: TParams;
    FileStream : TFileStream; //debug only
    StringStream : TStringStream;
code to save all other fields using INSERT statements in SQL then....

      if (DeltaDS.FieldByName('NOTES').NewValue<>Null) then
          myParams := TParams.Create;
          myParams.CreateParam(ftBlob, 'BlobParam', ptInput);
          myParams.ParamByName('BlobParam').LoadFromStream(StringStream, ftBlob);
          Connection.Execute(SQL, myParams);

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.