Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: IBDataset : save bitmap into blob field



Permlink Replies: 1 - Last Post: Mar 14, 2017 10:15 AM Last Post By: Jeff Overcash (...
Adalberto Baldini

Posts: 139
Registered: 1/31/12
IBDataset : save bitmap into blob field
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 14, 2017 2:54 AM
Delphi XE5, I want to copy a bitmap from an TImage into a blob field
as TImage.Picture holds bitmap file name which code I need to use to load image into blob ?

Regards
Adalberto Baldini
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: IBDataset : save bitmap into blob field
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 14, 2017 10:15 AM   in response to: Adalberto Baldini in response to: Adalberto Baldini
Adalberto Baldini wrote:
Delphi XE5, I want to copy a bitmap from an TImage into a blob field
as TImage.Picture holds bitmap file name which code I need to use to load image into blob ?

Regards
Adalberto Baldini

Easiest is to call CreateBlobStream from your TIBDataset passing your blob field
and the bmReadWrite BlobStreamMode. Then use the TPicture's Bitmap property and
call SaveToStream to the Blob stream.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02