I have a TSqlDataSet which has a blob field, I need to get the data of this blob field in the BeforeUpdateRecord event of the provider and execute an update command, I've tried this:
Cmd := TSQLQuery.Create(nil);
try
Cmd.SQLConnection := SQLConnection;
Cmd.CommandText := 'UPDATE MYTABLE SET IMAGE = :PIMAGE WHERE ID = :PID';
Cmd.Params.CreateParam(ftBlob, 'PIMAGE ', ptInput).Value := DeltaDS.FieldByName('IMAGE').NewValue; //blob field
Cmd.Params.CreateParam(ftString, 'PID', ptInput).Value := DeltaDS.FieldByName('ID').NewValue;
Cmd.ExecSQL;
finally
Cmd.Free;
end;
When I execute that I get an EDatabaseError with message: 'No value for parameter PIMAGE.
What am I missing?