EPUB | CHM | PDF

TPSQLDump.Events.OnLibraryLoad

Top Previous Next

Occurs when an application loads dump 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 dump library.

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

Example:

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

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