- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


Frequently Asked Questions

Copying a information from one memo field to another using TBlobStream

Question:

How do I copy information from one memo field in one table to another memo field in another table?

Answer:

Here's an example using a TBlobStream:

procedure TForm1.Button1Click(Sender: TObject);
var
  BS1, BS2: TBlobStream;
begin
  BS1 := TBlobStream.Create(Table1Notes,bmRead);
  try
    Table2.Edit;
    BS2 := TBlobStream.Create(Table2MyBlob,bmReadWrite);
    try
      BS2.CopyFrom(BS1,BS1.Size);
    finally
      BS2.Free;
    end;
  finally
    BS1.Free;
  end;
  Table2.Post;
end;



* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile