procedure TForm1.Button2Click(Sender: TObject);//写数据
var
sFileName: string;
function BlobContentToString(const FileName: string): string;
begin
with TFileStream.create(FileName, fmOpenRead) do
try
SetLength(Result, Size);
Read(Pointer(Result)^, Size);
finally
Free;
end;
end;
begin
if (OpenDialog1.Execute) then
begin
sFileName := OpenDialog1.FileName;
adodsBlobs.Edit;
adodsBlobs.FieldByName('ccc').AsString :=
BlobContentToString(sFileName);
adodsBlobs.Post;
end;
end;