 | Since v2.7.0 |
Changes current user and database without re-establishing database connection. MySQL's library mysql_change_user() function analog.
Syntax:
function ChangeUser(const aNewUserName : string;
const aUserPassword : string;
const aDatabaseName : string = '') : boolean;Description:
Use ChangeUser() method to change current user and database for current database connection.
aNewUserName
Name of user to change to.
aUserPassword
Password of user specified in aNewUserName param.
aDatabaseName
Name of database to switch to. If this is empty or omitted then current database remains the same.
ChangeUser method returns True if current user and/or database was changed successfully. Method returns False without changing current user and/or database if operation fails.