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:

Forwarding result sets

You can retrieve result sets from a remote database and forward them to a client as follows:

  1. When results are ready to be retrieved, associate the transaction object with a DataStore instance by calling the DataStore.SetTransObject function.
  2. Populate the DataStore by calling the Retrieve funtion.
  3. Call the DataStore.GenerateResultSet function and assign the returned object to a ResultSet instance.
  4. 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.