Example: passing an array by reference – PB Docs 125

Example: passing an array by reference

Description

This example demonstrates the use of a DataStore to retrieve
data in a server component. The server component uo_customers has
a function called retrieve_custlist. retrieve_custlist generates
an instance of the DataStore ds_datastore and
then uses this DataStore to retrieve all of the rows in the Customer
table. Once the data has been retrieved, retrieve_custlist passes
the data back to the client application.

Function declaration

The retrieve_custlist function
has an argument called customers, which is defined
as an array based on the structure st_custlist.
The structure st_custlist has the
same layout as d_custlist, the DataWindow
object used to access the database. The return value for retrieve_custlist,
which is used to return the number of rows retrieved, is of type Long.

Here is the signature of the retrieve_custlist function:

Script

Here is the script for the retrieve_custlist function:

At the conclusion of processing, the function retrieve_custlist destroys
the DataStore and returns the number of rows retrieved back to the
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