Chapter 27 Sending Result Sets
Sending result sets from a PowerBuilder component
This section briefly summarizes how PowerBuilder components
return result sets. For detailed instructions, see the Application
Techniques manual in the PowerBuilder documentation.
ResultSet objects
PowerBuilder components use DataStore objects
to store and manipulate result sets. The DataStore functions
like a DataWindow object, except that it has
no visual attributes.
Result sets are returned and retrieved using these PowerBuilder
objects:
- ResultSet Represents a single result set to be returned to the client.
You cannot directly manipulate the contents. Instead, call the DataStore functions
discussed below to populate a ResultSet from
the contents of a DataStore or vice-versa. Methods
in the component interface that return the TabularResults::ResultSet IDL
type are represented by PowerBuilder functions that return ResultSet.
- ResultSets Holds a list of 0 or more ResultSet instances;
the list is stored as the ResultSetList property.
Methods in the component interface that return the TabularResults::ResultSets IDL
type are represented by PowerBuilder functions that return ResultSets.
Forwarding result sets
You can retrieve result sets from a remote database and forward
them to a client as follows:
- When
results are ready to be retrieved, associate the transaction object with
a DataStore instance by calling the DataStore.SetTransObject function.
- Populate the DataStore by calling
the Retrieve funtion.
- Call the DataStore.GenerateResultSet function
and assign the returned object to a ResultSet instance.
- If the method returns ResultSets,
add the result set to the list in the ResultSets.ResultSetList property.
Otherwise, return the result set directly.
Copyright © 2000 Sybase, Inc. All rights reserved.
|
|