dbSetHostName#
Purpose#
Sets the specified database connection’s host name.
Format#
- dbSetHostName(db_id, host_name)#
- Parameters:
db_id (scalar) – database connection index number.
host_name (string) – the name to assign to the connection’s host name.
Remarks#
For this function to have an effect, it must be called before the
database connection is opened with dbOpen().
Examples#
// Add MySQL to the list of database connections
db_id = dbAddDatabase("MYSQL");
// Set the host name before opening
dbSetHostName(db_id, "db.example.com");
// Configure remaining settings and open
dbSetDatabaseName(db_id, "mydb");
dbOpen(db_id);