Try OpenEdge Now
skip to main content
Java Open Clients
Using the Open Client Java OpenAPI to Directly Access the AppServer : Setting up parameters : Defining the schema for a temp-table parameter mapped to a ProDataGraph
 

Defining the schema for a temp-table parameter mapped to a ProDataGraph

Defining the schema for an ABL temp-table (TABLE or TABLE-HANDLE) parameter passed as a com.progress.open4gl.ProDataGraph is a multi-step process.
Note: This is a condensed description with reference to the Java OpenAPI. For complete information on defining the schema for a temp-table parameter mapped to a ProDataGraph, see AccessingABL ProDataSets.
To define the schema for a temp-table parameter passed as a ProDataGraph:
1. Define a com.progress.open4gl.ProDataGraphMetaData object.
2. Add a single com.progress.open4gl.ProDataObjectMetaData object to the ProDataGraphMetaData that describes the schema of the temp-table parameter you are passing.
3. If the parameter is for input or input-output, define a com.progress.open4gl.ProDataGraph using the ProDataGraphMetaData to hold the parameter value.
4. Specify the ProDataGraphMetaData object and any ProDataGraph (for input or input-output) as a ProDataSet parameter to your ParamArray object using the appropriate set parameter method. For example:
Syntax
public void addTableHandle
               (int position,
                com.progress.open4gl.ProDataGraph value, int mode,
                com.progress.open4gl.ProDataGraphMetaData metaData)
            throws Open4GLException
Note: You can also pass a temp-table parameter as a java.sql.ResultSet. For more information, see Defining the schema for a temp-table parameter mapped to a java.sql.ResultSet.
This process is almost identical to defining the schema to set up a ProDataSet parameter. The two differences are that you:
1. Define only one temp-table in the ProDataGraphMetaData to represent the temp-table parameter you are passing.
2. Must add a temp-table parameter to a parameter array using the ProDataGraphMetaData, pass the ProDataGraphMetaData (and any input or input-output ProDataGraph) to the appropriate setTable() or setTableHandle() method (instead of a setDataset() or setDatasetHandle() method, as for a ProDataSet parameter).
Thus, the ProDataGraph becomes a wrapper for the actual temp-table parameter value. With these differences in mind, for more information on the steps to pass a temp-table parameter as a ProDataGraph, see Defining the schema for a ProDataSet parameter.
For more information on working with temp-table parameters mapped to a ProDataGraph, see AccessingABL ProDataSets.