AnsiString/RoAnsiString/read stream error and more

Hi,

I see one issue here:
you said that you have RODL-based server, but this call is related to CodeFirst-based server:

if you still have .RODL after updating, you should use old code for events:

procedure TServerDataModule.PVisArchiveSwitch(camera: Integer; date: TDateTime; workstation: String; CustomMessage : String);
var
  ev3 : IVideoCommandV3_Writer;
begin
  ev3 := (ROEventRepository as IVideoCommandV3_Writer);
  ev3.SessionList.Clear;
  ev3.ExcludeSessionList := false;
  ev3.ArchiveSwitch(EmptyGUID, camera, date, workstation, CustomMessage);
end;