Re: Saving a Bitmap Image to a Blob
Martijn Tonies wrote:
> Actually, it's quite easy ;-)
>
> 1st: do not use TDBImage -> it doesn't support
> JPGs, use TImage instead
>
> 2nd: create a parameterized INSERT INTO statement
> and use LoadFromFile or LoadFromStream on the
> parameter
>
> 3rd: execute the statement.
>
> Bingo, that should be it!
>
I've similar problem with inserting file into BLOB. The file size is about 500k so i use mediumblob filed type.
Inserting:
Qry.SQL.Text:='INSERT INTO tbl_brcfile VALUES (:BrdKey, :Brc)';
Qry.Parameters.ParamByName('BrdKey').Value:=BrdKey;
Qry.Parameters.ParamByName('Brc').LoadFromFile(BrcFileName, ftBlob);
try
Qry.ExecSQL;
Qry has type TADOQuery.
The at the last string (ExecSQL) apears the exception "Connection was lost". The program really looses the coonection but then reconnects automatically. No data is inserted into the table. What shall i do?:( Help!
Subject
Written By
Posted
Re: Saving a Bitmap Image to a Blob
June 12, 2006 02:59AM
December 28, 2006 08:13PM
December 29, 2006 05:38AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.