Advantage Client Engine
Delete a user object from the database.
UNSIGNED32 AdsDDDeleteUser( ADSHANDLE hAdminConn,
UNSIGNED8 *pucUserName );
hAdminConn (I) |
Handle of a database connection. |
pucUserName (I) |
Name of the user object to delete. |
AE_INVALID_OBJECT_NAME |
Possible cause for the error is that the pucUserName is not a valid user name in the database. |
AdsDDDeleteUser removes an existing user from the database. Once the user is removed from the database, any future connection attempts to the database using the specified user name will fail with authentication error. Any existing connections by the user will still be valid. However, those connections may not be able to open table or execute SQL statement if the database is set up to verify the users’ access rights. If the database is not set up to verify the users’ access rights, those connection can still open table and execute SQL statement. See AdsSetDatabaseProperty for information on setting up user access rights verification.
DROP permissions on the user are required to delete a data dictionary user. See Advantage Data Dictionary User Permissions for more information.
Note This function can be called inside a transaction, but will not be part of the transaction. Any changes it makes cannot be rolled back.
After making a connection to the database, delete the user named "User1" from the database.
AdsConnect60( "n:\\MyData\\myData.ADD", ADS_REMOTE_SERVER, "ADSSYS", NULL, ADS_DEFAULT, &hDD );
ulReturnCode = AdsDDDeleteUser( hDD, "User1" );