Database.DatabaseName

From Xojo Documentation

Property (As String )
aDatabase.DatabaseName = newStringValue
or
StringValue = aDatabase.DatabaseName

Supported for all project types and targets.

The name of the database to open.

Notes

The DatabaseName is typically used with server databases (such as MySQL or PostgreSQL) to identify the specific database to use on the server.

Sample Code

This code connects to a PostgreSQL database called "BaseballLeague":

Var db As New PostgreSQLDatabase
db.Host = "192.168.1.172"
db.Port = 5432
db.DatabaseName = "BaseballLeague"
db.UserName = "broberts"
db.Password = "streborb"
Try
db.Connect
// Use the database
Catch error As DatabaseException
// DB Connection error
MessageBox(error.Message)
End Try