Database application development is a feature of JBuilder Professional and Enterprise. Distributed application development is a feature of JBuilder Enterprise.
Between the time that you develop an application and each time the user runs it, many changes can happen to the data at its source. Typically, the data within the data source is updated. But more importantly, structural changes can happen and these types of changes cause greater risk for your application to fail. When such condition occurs, you can
By default, the columns that display in a data-aware component are determined at run-time based on the Columns
that appear in the DataSet
. If the data structure at the data source has been updated and is incompatible with your application, a run-time error is generated when the situation is encountered.
JBuilder offers support for data persistence as an alternative handling of such situations. Use this feature if your application depends on particular columns of data being available in order for your application to run properly. This assures that the column will be there and the data displayed in the specified order. If the source column of the persistent Column
changes or is deleted, an Exception
is generated instead of a run-time error when access to the column's data fails.
You can make a column persistent by setting any property at the Column
level (for example, an edit mask). When a column has become persistent, square brackets ([ ]) are placed around the column name.
To set a Column
level property,
DataSet
object, for example, select any project file (.jpr) in the /samples/DataExpress/ subdirectory of your JBuilder installation.
Frame
file to open it into the content pane, then click the Design tab.
DataSet
object. This displays the Column designer for the data set. The Column designer looks like this for the employee sample table:
Select the Column
for which you want to set the property. The Inspector updates to reflect the properties (and events) of the selected column.
To demonstrate, set the a minimum value for a Column
containing numeric data by entering a numeric value in the min
property. JBuilder automatically places square brackets ([ ]) around the column name.
In the Column designer, the columns for that data set are displayed in a table in the UI designer. A toolbar for adding, deleting, navigating, and restructuring the data set is provided.
The Delete button removes the column from the data set.
The Move Up and Move Down buttons manipulate the columns preferred ordinal, changes the order of display in data-aware components, such as a table control.
The Choose The Properties To Display button lets you choose which properties to display in the designer.
store
property has been set to a DataStore
. For more information on DataStore
objects, see "Persisting and storing data in a JDataStore".
Restructure compiles the this
component and launches a separate VM to perform a restructure of the DataStore
object associated with the data set. While the Restructure is running, a dialog box is displayed to show the status of the restructure and to allow you to cancel the restructure.
QueryDataSet
at run time. See "Using the Column designer to persist metadata".The Make All MetaData Dynamic button enables you to update a query after the table may have changed on the server. To do this, you must first make the metadata dynamic, then persist it, in order to use new indices created on the database table. Selecting Make All MetaData Dynamic will REMOVE CODE from the source file. See "Making metadata dynamic using the Column designer".
To close the Column designer, double-click any UI component, such as contentPane
, in the content pane, or click a different component, and select Activate Designer.The only way to close one designer is to open a different one.