A design feature of the JBCL is that the manipulation of data is independent of how the data was obtained. Regardless of which type of DataSet component you use to obtain the data, you manipulate it and connect it to controls in exactly the same way. Most of the examples in this chapter use the QueryDataSet component, but you can replace this with the TableDataSet or any StorageDataSet subclass without having to change code in the main body of your application.
Each sample is created using the JBuilder AppBrowser and design tools. Wherever possible, we'll use these tools to generate source Java code. Where necessary, we'll show you what code to modify, where, and how, to have your application perform a particular task.
These tutorials assume that you are comfortable using the JBuilder environment and do not provide detailed steps on how to use the user interface. If you're not yet comfortable with JBuilder, refer to the introductory tutorial in this manual or the User Guide chapter on JBuilder's visual design tools.
All of the following examples and tutorials involve accessing SQL data stored in a remote database. These examples use the sample files included with Local InterBase Server. This data is accessed using JDBC and the JDBC-ODBC Bridge software. For instructions on how to setup and configure Local InterBase, JDBC and the JDBC-ODBC bridge, see Installing and setting up JBuilder for database applications.
If you're having difficulties running the database tutorials that connect to Local InterBase sample databases, the troubleshooting topic provides common connection errors.
We encourage you to use the samples as guides when adding these functions to your application. Finished projects and Java source files are provided in the JBuilder samples directory (JBuilder\samples\borland\tutorial\dataset by default) for many of these tutorials, with comments in the source file where appropriate. All files referenced by these examples are found in the JBuilder samples directory, or in the InterBase examples directory.
To create a database application, you first need to connect to a database and provide data to a DataSet. Providing data sets up a query that can be used for each of the following database tutorials.