AdsDDDeleteUserGroup

Advantage Client Engine

Delete a user group object from the database.

Syntax

UNSIGNED32 AdsDDDeleteUserGroup( ADSHANDLE hAdminConn,

UNSIGNED8 *pucGroupName );

Parameters

hAdminConn (I)

Handle of a database connection.

pucGroupName (I)

Name of the user group object to delete.

Special Return Codes

AE_INVALID_OBJECT_NAME

Possible cause for the error is that the pucGroupName is not a valid user group name in the database.

Remarks

AdsDDDeleteUserGroup removes an existing user group from the database. All references to the user group by the database users are removed from the DD.

DROP permissions on the user group are required to delete a data dictionary user group. 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.

Example

After making a connection to the database, delete the user group named "Managers" from the database.

AdsConnect60( "n:\\MyData\\myData.ADD", ADS_REMOTE_SERVER, "ADSSYS", NULL, ADS_DEFAULT, &hDD );

ulReturnCode = AdsDDDeleteUserGroup( hDD, "Managers" );

See Also

AdsDDCreateUser

AdsDDCreateUserGroup

AdsDDAddUserToGroup

AdsDDRemoveUserFromGroup

AdsDDGrantPermission

AdsDDRevokePermission

sp_DropGroup