EPUB | CHM | PDF

TPSQLRestore.Events.OnLibraryLoad

Top Previous Next

Occurs when an application loads restore library.

Syntax:

type
  TLibraryLoadEvent = procedure (Sender: TObject; var FileName: string) of object;
property OnLibraryLoad: TLibraryLoadEvent;

Description:

Write an OnLibraryLoad event handler to take specific actions when an application attempts to load restore library.

By default, a FileName equals to 'pg_restore.dll'.

Example:

This example check database server version and sets FileName parameter depends on it.

procedure TForm1.PSQLRestore1LibraryLoad(Sender: TObject;
  var FileName: String);
begin
  if (Sender as TPSQLRestore).Database.ServerVersionAsInt < 080400 then
    FileName := 'pg_restore-8.3.8.dll';
end;