dbGetPassword#
Purpose#
Returns a connection’s password.
Format#
- db_password = dbGetPassword(db_id)#
- Parameters:
db_id (scalar) – database connection index number.
- Returns:
db_password (string) – Contains the password for the specified database connection or a null string.
Remarks#
dbGetPassword() will only return passwords set with dbSetPassword().
Examples#
// Add MySQL to the list of database connections
db_id = dbAddDatabase("MYSQL");
// Set the password before opening
dbSetPassword(db_id, "secretpass");
// Retrieve the password
pw = dbGetPassword(db_id);
print pw;