SetStream Method for LCField
This method sets the value of the field to a specified LCStream value (text or binary). If the field is not of type LCTYPE_STREAM, or is of that type but uses a format that does not match the supplied value (text as opposed to binary, for instance), Notes® tries to convert the value to the field's type. If this fails, error LCFAIL_INVALID_CONVERT will occur.
The data type of the field will not change from this operation -- only the field's value.
Defined In
LCField
Syntax
Call thisfield.SetStream (index, srcStream)
Parameters
Parameter |
Description |
---|---|
index |
Long. Index identifying the value that is to be assigned. |
srcStream |
LCStream. Value to be assigned to the field data value. |
Example
Option Public
Uselsx "*lsxlc"
Sub Initialize
Dim field As New LCField (LCTYPE_TEXT)
Dim msg As New LCStream
msg.Text = "Hello World"
Call field.SetStream (1, msg)
Print "The field's value is " & field.text(0)
End Sub
Example Output
The field's value is Hello World.