PostgreSQLDatabase.Port

From Xojo Documentation

Property (As Integer )
aPostgreSQLDatabase.Port = newIntegerValue
or
IntegerValue = aPostgreSQLDatabase.Port

Supported for all project types and targets.

The port of the PostgreSQL database to connect to. PostgreSQL's default port is 5432.

Examples

This example opens an existing PostgreSQL database and changes the Port.

Var db As PostgreSQLDatabase
db = New PostgreSQLDatabase
db.Host = "192.168.1.172"
db.port = 5516
db.DatabaseName = "myDatabase"
db.Username = "Charlie"
db.Password = "mashie"
Try
db.Connect
// proceed with database operations
Catch error As DatabaseException
MsgBox("The connection failed: " + error.Message)
End Try