Inquiring the method of processing (Delphi) remobject Server BLOB

Hello,

I am the developer who is using the
remobject(6.0.51.901).

I want to save the image file on Oracle DB through Remobject server and pass it to the Cilent.

But, I am inquiring since there is no blob in the Data type from Remobjects Service Builder.

How can I set the image file(jpg or png)?

Also I am wondering how should I set the parameters, datatype and blob type in the Data Abstract Schema Moderler.

Please reply me with how should I set it.

Thank you.

Hi,

you can pass your image in Binary type from client to server.
the Binary type this is TMemoryStream descendant so you can easily load your image from file.
in DataAbstract you can use datBlob type and dabtBlob or dabtOraBlob blob subtype. blob subtype is depended on DAD driver you are using.

Hello,

Thank you for your description.

But I still cannot do it eventhough there is your description, so is there any sample that I can see?

For example

There is no ASQLCommand: IDASQLCommand;

ASQLCommand.ParamByName(‘IMAGE’).ASBLOB

Should I change the value pass by Binary to the blob type?

Thanks for your answer in advance.

Hi,

it can be something like

procedure TDataService.NewMethod(const PK: Integer; const image: TROBinaryMemoryStream);
const
  SQL = 'UPDATE Employees SET Photo = :Photo WHERE EmployeeID = :OLD_EmployeeID';
var
  isql: IDASQLCommand;
begin
  Connection.BeginTransaction;
  try
    isql := Connection.NewCommand(SQL,stSQL);
    isql.ParamByName('OLD_EmployeeID').Value := PK;
    isql.ParamByName('Photo').LoadFromStream(NewROStream(image));
    isql.Execute;
    Connection.CommitTransaction;
  except
    Connection.RollbackTransaction;
  end;
end;