You can access relational data using Data Access beans. However, before you can use the
beans you must:
- Add the Data Access Beans feature to VisualAge for Java. You can do this using the Quick
Start window.
- Add the directory or JAR/ZIP file to the Workspace classpath, as appropriate for the
JDBC driver class you select for database connection. You can do this using the Options
window.
After you add the feature and set the classpath, you can access relational data by
using any of three Data Access beans to access relational data in different ways:
- The Select bean allows you to run a query and access the result set returned by the
query. You can insert, update, and delete rows in the result set without writing separate
SQL INSERT, UPDATE and DELETE statements. Using the Select bean in the Visual Composition
Editor may involve:
- The Modify bean allows you to run SQL INSERT, UPDATE, or DELETE statements without first
running a query and retrieving its result set. Using a Modify bean in the Visual
Composition Editor may involve:
- The ProcedureCall bean allows you to run a stored procedure passing values for input
parameters and receiving values for output parameters. If the stored procedure returns one
or more result sets, the ProcedureCall bean gives you access to them and you can insert,
update or delete rows within the result sets without writing separate SQL INSERT, UPDATE
and DELETE statements. Using the ProcedureCall bean in the Visual Composition Editor may
involve:
Selector beans allow you to define a subset of the result set returned by a Select or
ProcedureCall bean. As appropriate, the selector beans implement either the Java ComboBoxModel or
TableModel interface, so they can pass data directly to user interfaces such as a JList
or JTable. Using Selector Beans in the Visual Composition Editor
may involve:
Using the Quick Start Window
Setting the Class Path
