Controlling access to the current database

The Database painter's Design>Table Security menu allows you to control access to the current database. You use the Table Security dialog box to assign table access privileges to different users and groups.

UltraLite databases do not use owners and groups. All users have full permission to update tables, and you cannot use the procedures described in this section to grant or revoke access to tables.

NoteUser maintenance in UltraLite databases Although you cannot set table-level security for UltraLite databases, PocketBuilder allows you to add or edit multiple users in these databases. UltraLite permits a maximum of four user IDs per database. For UltraLite database profiles, you can use the pop-up menu for the Users item in the Objects view of the Database painter to add or edit users, and to delete users.

When you select Add or Edit User from the User item pop-up menu for an UltraLite database, or when you select Delete User, you should already know which user IDs exist in the database. If you select either of these menu items, the Properties view displays. The Properties view has three text boxes (User, New Password, and Confirm New Password) when you select Add or Edit User, and a single text box (UltraLite User to Delete) when you select Delete User.

After you save changes in the Database painter involving user maintenance for an UltraLite database, the Output view displays a message with the type of change you made.

Figure 16-13 shows the Table Security dialog box that allows you to assign privileges to selected users or groups for specific tables in a database.

Figure 16-13: Assigning privileges in the Table Security dialog box

Shown is the Table Security dialog box. It has groups and users listed in a list box at the left and tables listed in a second list box. A group box titled Privileges has check boxes for Alter, Delete, Insert, References, Select, and Update. Buttons labeled Apply and Done are visible at the top right, and a button labeled Update is visible in the Columns group box at the bottom right. In this picture, the public group of users is selected for the customer table, for which only update privileges are granted.

StepsTo control access to the current database:

  1. Select Design>Table Security from the Database painter menu

  2. Select a user or group, or multiple users and groups, from the Groups/Users list box.

  3. Select a table from the Tables list box.

  4. Select the privileges you want to give the selected users or groups for the table you selected in the previous step, and click Apply.

    Update privileges can be restricted to specific columns of the selected table by clicking the Update button, selecting only those columns for which you want to grant the privilege, and clicking OK.

  5. Repeat steps 2 – 5 until you have granted all the privileges that you want to assign, then click Done.