Advantage SQL Engine
Sets one property associated with a database user in the data dictionary.
sp_ModifyUserProperty(
UserName,CHARACTER,50,
Property,CHARACTER,200,
Value,Memo )
UserName (I) |
Name of the database user object to set the associated property. |
Property (I) |
Name of a database user property to set. See Remarks for allowed values. |
Value (I) |
Property value to set. |
AE_INVALID_OBJECT_NAME Possible cause for the error is that the UserName does not specify a valid user name in the database.
sp_ModifyUserProperty sets one user property associated with the specified user. The new property overwrites the existing property in the data dictionary. The following are the valid values of Property and the expected value in Value. If a regular user makes the connection, the only property that can be set is USER_PASSWORD for the same user who made the connection.
usPropertyID |
Description |
COMMENT |
Stores a new description for the user. |
USER_PASSWORD |
Sets a new password for this user. The user password is used by the Advantage Database Server or the Advantage Local Server to authenticate a user when he makes a connection to the database. See AdsConnect60 for more information on database connections. To allow the user to connect without a password, specify NULL or an empty string. The maximum length of the password is 20 characters. USER_PASSWORD can be used to set the administrator password by specifying the ‘ADSSYS’ as the user name. |
ENABLE_INTERNET |
This property enables/disables the Internet access for the user. If it is disabled, the user will be allowed to connect from the Internet. Expected values are True and False. For more information see Advantage Internet Server. |
LOGINS_DISABLED |
This property enables/disables the database login for the user. If it is enabled, the user will not be allowed to login to the database. Expected values are True and False. |
USER_DEFINED_PROP |
Changes the user defined user property.
|
Note When the database is created, it is default to allow anonymous user to make database connection with no user name and no password. Setting the LOG_IN_REQUIRED database property to True will disable the anonymous user connections and improve the database security. See sp_ModifyDatabase for more information.
After making a connection to the database, set a new password for user ‘
User1’.
EXECUTE PROCEDURE sp_ModifyUserProperty(
‘User1’,
‘USER_PASSWORD’,
‘Super secret’ );
See Also