BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TIBSQL and TBlobFields.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (InterBase Express)
View previous topic :: View next topic  
Author Message
Roberto Colpani
Guest





PostPosted: Sat Mar 24, 2007 8:11 am    Post subject: TIBSQL and TBlobFields. Reply with 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?
Back to top
Wayne Niddery [TeamB]
Guest





PostPosted: Sat Mar 24, 2007 7:35 pm    Post subject: Re: TIBSQL and TBlobFields. Reply with quote



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





PostPosted: Mon Mar 26, 2007 8:11 am    Post subject: Re: TIBSQL and TBlobFields. Reply with quote



Thanks very much.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (InterBase Express) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.