This sample application demonstrates events that occur when
resolving changes back to a (database) data source, and how to
use these events to customize resolver event processing.
For more information on resolver events, see "Customizing the default
resolver logic" in the Database Application Developer's Guide.
This tutorial 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 for availability
of features in each JBuilder version.
When you run your application, you'll notice the following behavior:
- A grid is bound to the Customer table in the Local InterBase Server sample database
- The Save Changes button creates a custom QueryResolver object which takes control of the resolution process.
- The resolver displays status messages in a ListControl.
- Row deletions are not allowed. Any attempt at deleting a row of data is unconditionally prevented. This demonstrates usage of the deletingRow event.
- Row insertions are permitted only if the customer is from the United States. If the current customer is not from the U.S., the process is aborted. This example demonstrates usage of the insertingRow event and a ResolverResponse of abort().
- Row updates are allowed. When a value in the Customer column is changed, the old and new values are shown the list control. This demonstrates how to access both the new information as well as the prior information during the resolution process.