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

Syntax 2 – PB Docs 2019 – PowerBuilder Library

Syntax 2 – PB Docs 2019

Syntax 2

Description

Exports all rows or only the changed rows from all or specified
buffers to a plain JSON string or DataWindow JSON string.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object, and
DataStore object, except for those with the Composite, Crosstab,
OLE 2.0, or RichText presentation styles.

Syntax

PowerBuilder

Argument

Description

dwcontrol

A reference to a DataWindow control, DataStore, or
DataWindowChild.

dwbuffer (optional)

A value of the dwBuffer enumerated datatype
identifying the DataWindow buffer from which you want to export
the data. For a list of valid values, see DWBuffer.

If
not specified, all of the DataWindow buffers will be exported,
however, the data for DataWindowChild will not be exported (even
if changedonly is false).

changedonly

A boolean specifying the changing
flag.

  • True — to export the changed rows only (and all
    rows of the Delete buffer).

  • False — to export all rows. The default is
    false.

format

A boolean specifying the JSON
format.

  • True indicates the DataWindow JSON

  • False indicates the plain JSON. The default is
    false.

See the section called “Supported JSON formats” in Application Techniques for details about the JSON
format.

Return value

String. Returns the JSON string if it succeeds. Returns the empty
string (“”) if an error occurs.

The method returns null if any of the following:

  • any argument’s value is null

  • the DataWindow object (dataobject) is invalid

  • the DataWindow presentation style is unsupported, such as
    Composite, Crosstab, OLE 2.0, or RichText

Usage

The Number data type is handled as Double data type; 15 digits of
precision is supported; and it will be written in scientific notation if
it exceeds 15 digits.

The Decimal{0} data type is handled as Double data type; it has no
fractional part, and the digits in the fractional part (if any) will be
rounded to the integral part; 15 digits of precision is supported; and
it will be written in scientific notation if it exceeds 15
digits.

The Decimal{n} data type is handled as Double data type; it can
have n digits in the fractional part, and the following digits (if any)
will be rounded; 15 digits of precision is supported; and it will be
written in scientific notation if it exceeds 15 digits.

Examples

This example exports the changed rows from all buffers of the
DataWindow to a DataWindow JSON string:

This example exports the changed rows from the primary buffer of
the DataWindow to a plain JSON string:

See also

ImportJson

ImportJsonByKey


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