Прочитать BlobStream при помощи TADOQuery из базы Access
Оформил: DeeCo
Автор: http://www.swissdelphicenter.ch
function GetBlobStream(Query: TADOQuery): TMemoryStream;
begin
result := TMemoryStream.Create;
// You must connect to AccessDB first.
// See: Query.Connection, TADOConection or Query.ConnectString
// Send SQL command
Query.Active := False;
Query.SQL.Clear;
// data is my row and email the table
Query.SQL.Append('SELECT data FROM email WHERE id=1');
Query.Active := True;
Result.LoadFromStream(Query.CreateBlobStream(Query.FieldByName('Data'), bmRead));
end;
|