EPUB | CHM | PDF

TPSQLDatabase.Properties.ServerVersion

Top Previous Next

Contains server version string.

Syntax:

property ServerVersion: string;

Description:

Shows the version number of the server. It is determined by the value of PG_VERSION when building the server.

Example:

This example extracts major value of server version:

procedure TForm1.Button2Click(Sender: TObject);
var Major: string;
    I,J: integer;
begin
  I := Pos(' ',PSQLDatabase1.ServerVersion);
  inc(I);
  J := I;
  While PSQLDatabase1.ServerVersion[i]<>'.' do
   inc(I);
  Major := Copy(PSQLDatabase1.ServerVersion,J,I-J);
  ShowMessage(Major);
end;