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 1 For reading into a string – PB Docs 126 – PowerBuilder Library

Syntax 1 For reading into a string – PB Docs 126

Syntax 1 For reading into a string

Description

Reads data from an OLE stream object into a string.

Controls

OLEStream objects

Syntax

Argument

Description

olestream

The name of an OLE stream variable that
has been opened.

variable

The name of a string variable into which
want to read data from olestream.

stopforline (optional)

A boolean value that specifies whether
to read a line at a time. In other words, Read will
stop reading at the next carriage return/linefeed. Values
are:

  • TRUE – (Default)
    Stop at the end of a line and leave the read pointer positioned
    after the carriage return/linefeed so the next read will
    read the next line

  • FALSE – Read the whole
    stream or a maximum of 32,765 bytes

Return Values

Integer. Returns the number of characters
or bytes read. If an end-of-file mark (EOF) is encountered before
any characters are read, Read returns -100. Read returns
one of the following negative values if an error occurs:

  • -1 Stream is
    not open

  • -2 Read error

  • -9 Other error

If any argument’s value is null, Read returns null.

Examples

This example opens an OLE object in the file MYSTUFF.OLE and
assigns it to the OLEStorage object stg_stuff.
Then it opens the stream called info in stg_stuff and
assigns it to the stream object olestr_info.
Finally, it reads the contents of olestr_info into
the string ls_info.

The example does not check the functions’ return
values for success, but you should be sure to check the return values
in your code:

See Also


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