| View previous topic :: View next topic |
| Author |
Message |
Roberto Colpani Guest
|
Posted: Sat Mar 24, 2007 8:11 am Post subject: TIBSQL and TBlobFields. |
|
|
I have the necessity with a TIBSQL to retrive some TMemoFields and some
pictures stored in Interbase as TBlob. When I open the DataSet and with this
construct I want to retrive the memo I have an error. This is the
constructor:
MyBitMap := TBitMap.Create;
MyBitMap.Assign(TBlobfield(AIBSQL.Fields[0]));
How can I retrive a Blob field from a TIBSQL? |
|
| Back to top |
|
 |
Wayne Niddery [TeamB] Guest
|
Posted: Sat Mar 24, 2007 7:35 pm Post subject: Re: TIBSQL and TBlobFields. |
|
|
Roberto Colpani wrote:
| Quote: | I have the necessity with a TIBSQL to retrive some TMemoFields and
some pictures stored in Interbase as TBlob. When I open the DataSet
and with this construct I want to retrive the memo I have an error.
This is the constructor:
MyBitMap := TBitMap.Create;
MyBitMap.Assign(TBlobfield(AIBSQL.Fields[0]));
How can I retrive a Blob field from a TIBSQL?
|
var ms: TMemoryStream;
begin
ms := TMemoryStream.Create;
try
TBlobfield(AIBSQL.Fields[0]).SaveToStream(ms);
ms.Position := 0;
MyBitMap.LoadFromStream(ms);
finally
ms.Free;
end;
end;
--
Wayne Niddery - Winwright, Inc (www.winwright.ca)
"Democracy, without the guarantee of liberty, is merely a method of
selecting tyrants." - Alan Nitikman |
|
| Back to top |
|
 |
Roberto Colpani Guest
|
Posted: Mon Mar 26, 2007 8:11 am Post subject: Re: TIBSQL and TBlobFields. |
|
|
Thanks very much. |
|
| Back to top |
|
 |
|