When you work in PocketBuilder, you can share database profiles among users. This section describes what you need to know to set up, use, and maintain shared database profiles in PocketBuilder.
You can share database profiles in the PocketBuilder development environment by specifying the location of a file containing the profiles you want to share. You specify this location in the Database Preferences dialog box in the Database painter.
To share database profiles among all PocketBuilder users at your site, store a profile file on a network file server accessible to all users. This shared profile file contains two profiles:
[DBMS_PROFILES] Profiles=Sales, Orders [Profile Sales] DBMS=ODBC DBParm=ConnectString='DSN=Sales;UID=dba;PWD=sql' Prompt=FALSE AutoCommit=FALSE [Profile Orders] DBMS=ODBC DBParm=ConnectString='DSN=Orders;UID=;PWD=sql' Prompt=FALSE AutoCommit=FALSE
When you share database profiles, PocketBuilder displays shared database profiles from the file you specify as well as those from your registry.
Shared database profiles are read-only. You can select a shared profile to connect to a database, but you cannot edit, save, or delete profiles that are shared. You can, however, make changes to a shared profile and save it on your computer, as described in “Making a local copy of a shared database profile”.
To set up shared database profiles in PocketBuilder, you specify the location of the file containing shared profiles in the Database painter’s Database Preferences dialog box.
To set up shared database profiles:
In the Database painter, select Design>Options from the menu bar.
The Database Preferences dialog box displays. If necessary, click the General tab to display the General property page.
In the Shared Database Profiles box, specify the location of the file containing the database profiles you want to share. Do this in either of the following ways:
Type the location (path name) in the Shared Database Profiles box
Click the Browse button to navigate to the file location and display it in the Shared Database Profiles box
In the following example, I:\SHARE\dbprofs.ini is the name and location of the file containing the database profiles to be shared:
Click OK to apply the Shared Database Profiles setting to the current connection and all future connections and close the Database Preferences dialog box.
PocketBuilder saves your Shared Database Profiles setting in the registry.
You select a shared database profile to connect to a database the same way you select a local profile. The Database Profiles dialog box lists both shared and local profiles. Shared profiles are denoted by a network icon and the word (Shared).
Figure 13-4: Shared database profiles in the Database Profiles dialog box
Because shared database profiles can be accessed by multiple users running PocketBuilder, you cannot make changes to these profiles. However, you can modify and save a copy of a shared database profile for your own use.
Select the profile in the Database Profiles dialog box, click Edit, and modify the profile. When you click OK to save your changes, PocketBuilder pops up a response window asking if you want to save a copy of the profile to your local machine. When you click OK, PocketBuilder saves the modified copy in your computer’s registry. Both profiles display in the Database Profiles dialog box.
If you maintain the database profiles for PocketBuilder at your site, you might need to update shared database profiles from time to time and make these changes available to your users.
Because shared database profiles can be accessed by multiple users running PocketBuilder, it is not a good idea to make changes to the profiles over a network. Instead, you should make any changes locally and then provide the updated profiles to your users.
To maintain shared database profiles at your site:
Make and save required changes to the shared profiles on your own computer. These changes are saved in your registry.
Export the updated profile entries from your registry to the existing file containing shared profiles.
For instructions, see “Importing and exporting database profiles”.
If they have not already done so, have users specify the location of the new profiles file in the Database Preferences dialog box so that they can access the updated shared profiles on their computers.