Subject | Re: [IBO] tib_image code example? |
---|---|
Author | Robert Martin |
Post date | 2015-10-05T21:42:27Z |
Hi Russell
Off the the top of my head something like
Query.SQL.Add('INSERT INTO aTable (aPK, aImageBlob) VALUES (1, :aImageBlob)');
either....
Query.ParamByName('aImageBlob').LoadFromFile('c:\a\aImage.jpg');
or
Query.ParamByName('aImageBlob').LoadFromString(aStreamWithData);
Query.ExecSQL;
There are other ways also but these are easy :)
Cheers
Rob
Off the the top of my head something like
Query.SQL.Add('INSERT INTO aTable (aPK, aImageBlob) VALUES (1, :aImageBlob)');
either....
Query.ParamByName('aImageBlob').LoadFromFile('c:\a\aImage.jpg');
or
Query.ParamByName('aImageBlob').LoadFromString(aStreamWithData);
Query.ExecSQL;
There are other ways also but these are easy :)
Cheers
Rob
On 6/10/2015 10:06 a.m., russell@... [IBObjects] wrote:
Is there somewhere a code example for inserting a file of an image into a blob field sub_type 0?
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.6140 / Virus Database: 4435/10764 - Release Date: 10/05/15