CreateFrom – PB Docs 150

CreateFrom method (DataWindows)

Description

Creates a DataStore object from the passed ResultSet object.

Controls

DataWindow type

Method applies to

PowerBuilder

DataStore object

Syntax

[PowerBuilder]

Argument

Description

dsobject

The name of the DataStore object into
which you want to place the data in the passed result set

rssource

A ResultSet or ADOResultSet object that
contains meta data from which the DataStore object is created

Return Values

Integer. Returns 1 if it succeeds or a negative number if
an error occurs. If any argument is null, in PowerBuilder the method
returns null.

Usage

Use CreateFrom to create a DataStore from
a passed result set. Typically, a PowerBuilder client calls methods
on a component running in a transaction server and converts results
sets returned from those methods to DataStore objects using CreateFrom.

CreateFrom creates an external DataWindow
definition with no visual component—it has no controls
and the height of all bands is zero. Since the data source for the
DataStore object is external, Update methods on the DataStore object
have no effect. The Print method will print a blank page.

Client applications can use the DataStore object directly
or display the data in a DataWindow control using the ShareData
method.

For more information about result sets and methods for exchanging
data between components and clients, see Usage for GenerateResultSet.

Examples

This example creates an instance of the SVUBookstore
component, calls the GetMajors method, and creates
a DataStore object using the data definition in the returned ResultSet
object:

This example creates a DataStore object from an ADO
Recordset returned from a method on an MTS component.

See Also

  • GenerateResultSet

  • SetRecordSet in the PowerScript Reference

  • SetResultSet in the PowerScript Reference


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