Subject | Re: [IBO] TIB_Blobstream |
---|---|
Author | Helen Borrie |
Post date | 2001-04-11T03:41:57Z |
At 03:36 AM 11-04-01 +0000, you wrote:
...
with Query1.FieldByName('Notes') as TIB_ColumnBlob do
begin
AssignTo(Stream);
...
end
...
etc. etc. See also tib_Statement.CreateBlobStream().
Cheers,
Helen
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>How can i convert this to TIB_Blobstream ??? Anyone ???In Delphi (as long as the field is a blob and the query is a TIB_Query:
...
with Query1.FieldByName('Notes') as TIB_ColumnBlob do
begin
AssignTo(Stream);
...
end
...
etc. etc. See also tib_Statement.CreateBlobStream().
Cheers,
Helen
>void __fastcall TForm1::Button1Click(TObject *Sender)All for Open and Open for All
>
>{
> int MemSize;
> char *Buffer;
> TBlobStream *Stream;
> if (!Query1->Eof)
> Query1->Next();
> Stream = new TBlobStream((TBlobField *)Query1->FieldByName("Notes"),
> bmRead);
> try
> {
> MemSize = Stream->Size + 1; // add one for null terminator
> Buffer = new char[MemSize]; // Allocate the memory.
> try
> {
> Stream->Read(Buffer, MemSize); //Read Notes field into buffer.
> Memo1->SetTextBuf(Buffer); // Display the buffer's contents.
>
> }
> catch (...)
> {
> delete Buffer;
> throw;
> }
> delete Buffer;
> }
> catch (...)
> {
> delete Stream;
> throw;
> }
> delete Stream;
>}
>
>
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________