To access data from your Java project, you typically use the ActiveX Data Objects (ADO) components, which define the data programming model for WFC applications. The core ADO objects include the Connection, Command, and Recordset objects.
The Connection object allows you to connect to a database. Once a connection is established, you can query the database to retrieve a set of records. The Recordset object represents the records returned from a query. You can use either an SQL string or a Command object to specify the query.
ADO also provides the DataSource component, which combines the functionality of the Connection, Command, and Recordset objects. The ADO classes are defined in the com.ms.wfc.data and com.ms.wfc.data.ui packages.
Once a recordset has been retrieved, either through a Recordset object or a DataSource component, you can bind the recordset to a WFC component. WFC supports both simple and complex data binding, as described in the following table.
Type of Binding | Description |
Simple | Refers to the relationship between a field in a recordset and the property of a WFC component. The binding is called simple because the component does not need explicit information about the data protocol or data provider. |
Complex | Refers to the direct relationship between a recordset and a WFC component. |
Note that the recordset’s cursor and lock types determine whether the data in the recordset dynamically reflects the data in the database, and whether the data in the recordset can be changed.
For more information about ADO, see the Microsoft® ActiveX® Data Objects section of the MSDN Library.