Page 1 of 1

Using TMyQuery Parameters with Blob field

Posted: Fri 09 Jun 2006 15:10
by shidewa
I use MySQL Data Access for Delphi.
I want to update a table with a Blob field. I use a TMyQuery component with a Insert statement and a parameter to pass the file into the Blob field. Does someone know how to a file into a parameter ?

with qryMySQLUpdate do
begin
SQL statement...
Params.ParamByName('ABlobField').AsBlob := ?
end;

Shidewa

Posted: Sun 11 Jun 2006 22:44
by GEswin

Code: Select all

 Params.ParamByName('ABlobField').LoadFromFile(....);

 or

 Params.ParamByName('ABlobField').LoadFromStream(...);
would do the job.