Using TMyQuery Parameters with Blob field

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
shidewa
Posts: 3
Joined: Fri 09 Jun 2006 13:54

Using TMyQuery Parameters with Blob field

Post by shidewa » Fri 09 Jun 2006 15:10

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

GEswin
Posts: 186
Joined: Wed 03 Nov 2004 16:57
Location: Spain
Contact:

Post by GEswin » Sun 11 Jun 2006 22:44

Code: Select all

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

 or

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

Post Reply