Description:
This sample application contains the completed files from the
tutorial entitled "Displaying or hiding navigator buttons at run time" in the
Database Application Developer's Guide.
It shows how two datasets displayed in grids can share a single
NavigatorControl and StatusBar. The two datasets used
here are the
DEPARTMENT and EMPLOYEE tables from the InterBase sample database, joined
in a maser-detail relationship. For the purposes of the example we
assume that users are not allowed to modify the DEPARTMENT table, and
demonstrate how the buttons on the navigator control that allow editing
can be diabled
when the grid displaying the DEPARTMENT table receives focus, then enabled
again when the grid displaying the EMPLOYEE table receives focus.
Before you run this application, install and set up Local InterBase Server and the sample data source as described in "Installing and setting up Local InterBase Server" in the Database Application Developer's Guide. This tutorial also requires that you have a version of JBuilder that includes the JBuilder DataBroker database architecture components.
Note: All versions of JBuilder provide direct access to SQL data through the JavaSoft JDBC API. Some versions of JBuilder provide additional DataBroker components (on the Data Access tab of the Component Palette) that greatly simplify RAD visual development of database applications. Refer to the JBuilder product page from the Borland Web site at http://www.borland.com for availability of features in each JBuilder version.
Running the Application:
Note: Because of data constraints on the EMPLOYEE table, the save operation may not succeed depending on the data you change. Since other edits may return errors, we suggest you make changes only to the FIRST_NAME and LAST_NAME values in existing rows until you become more familiar with the constraints on this table. For more information, see the "Tips on using InterBase" topic in the Database Application Developer's Guide.