Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Passing result sets – PB Docs 125 – PowerBuilder Library

Passing result sets – PB Docs 125

Passing result sets

PowerBuilder provides two system objects to handle getting
result sets from components running in EAServer and
returning result sets from PowerBuilder user objects running as EAServer components. These system
objects, ResultSet and ResultSets, are designed to simplify the
conversion of transaction server result sets to and from DataStore
objects and do not contain any state information. They are not designed
to be used for database updates. You use the CreateFrom and GenerateResultSet functions
on the DataStore object to convert the result sets stored in these
objects to and from DataStore objects.

note.png About GenerateResultSet

GenerateResultSet has an alternative syntax
used for returning a Tabular Data Stream result set when using MASP
(Method as Stored Procedure) with EAServer.
For more information, see the DataWindow Reference.

Component methods that return result sets use the TabularResults
module. Single result sets are returned as TabularResults::ResultSet
structures. Multiple result sets are returned as a sequence of ResultSet
structures using the TabularResults::ResultSets datatype.

Accessing result sets in EAServer components
from PowerBuilder clients

When you generate an EAServer proxy
object in PowerBuilder for an EAServer component
method that returns TabularResults::ResultSet, the method on the
proxy object returns a PowerBuilder ResultSet object. Methods that
return multiple result sets return a PowerBuilder ResultSets object.

note.png Viewing proxies in the Browser

You can view the properties and methods of EAServer proxy objects on the Proxy
tab in the PowerBuilder Browser.

You can access the result set from a PowerBuilder client by
creating an instance of the component, calling the method, and then
using the result set to populate a DataStore object with the CreateFrom function.

This example creates an instance of the SVUBookstore component
and calls the GetMajors method:

Returning result sets from EAServer components

To pass or return result sets from a PowerBuilder user object
that will be deployed to EAServer,
set the datatype of a function’s argument or return value to
ResultSet (for a single result set) or ResultSets (for multiple
result sets). When the user object is deployed as an EAServer component, the ResultSet and
ResultSets return values are represented in the IDL interface of
the component as TabularResults::ResultSet and TabularResults::ResultSets datatypes.

In this example, a DataStore object is created and data is
retrieved into it, and then the GenerateResultSet function
is used to create a result set that can be returned to a client:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x