EPUB | CHM | PDF

TPSQLDump.Properties.VersionAsInt

Top Previous Next

Returns an integer representing the pg_dump.dll version.

Syntax:

property VersionAsInt: integer;

Description:

Applications may use this readonly property to determine the version of the pg_dump.dll library will be used by TPSQLDump object. The number is formed by converting the major, minor, and revision numbers into two-decimal-digit numbers and appending them together. For example, version 7.4.2 will be returned as 70402, and version 8.1 will be returned as 80100 (leading zeros are not shown). Zero value is returned if the library can not be found.

Example:

This example checks if server version is higher then dump library and if so version check is disabled:

procedure TForm1.Button2Click(Sender: TObject);
begin
  If PSQLDatabase1.ServerVersionAsInt > PSQLDump1.VersionAsInt then
   PSQLDump.Options := PSQLDump.Options + [doIgnoreVersion];
end;

See also: VersionAsStr, TPSQLRestore.VersionAsInt