Advantage SQL Engine
Create a new user in the database.
sp_CreateUser(
UserName,CHARACTER,50,
Password,CHARACTER,20,
Comment,MEMO )
UserName (I) |
Name of the user to create. |
Password (I) |
Initial password for the user. This parameter can be NULL or an empty string to specify no password for this user. |
Comment (I) |
Optional description of the user. This parameter can be NULL. |
sp_CreateUser creates a user object in the database. The initial password can be changed by sp_ModifyUserProperty. Creating users in the database allows the administrator to control who has access to what table in the database. When a database is created, it by default to allow anonymous connections to the database and no access rights checking is performed. Those options can be turned on by sp_ModifyDatabase.
After making a connection to the database, create a user named "User1" in the database and grant the user read only permission to the "Customer Information" table.
EXECUTE PROCEDURE sp_CreateUser(
‘User1’,
NULL,
‘This user has read rights to tables.’ );
GRANT SELECT ON "Customer Information" TO User1;
See Also