GetStream Method for LCField

This method retrieves a stream value from a field. If the requested data type is different from the field data type, conversion is automatically performed. If conversion is not possible, error LCFAIL_INVALID_CONVERT occurs.

Defined In

LCField

Syntax

Set newStream = thisField.GetStream (index, streamFormat)

Parameters

Parameter

Description

index

Long, >= 1. Index of the field data value to be retrieved.

streamFormat

Long. Stream format to obtain the data in. For a list of valid values, refer in this chapter to "LCField Class Methods and Properties Summary," Stream Formats section. Any stream format is allowed. In addition, a value of zero will either use the stream format of the field (if this Field is TEXT or BINARY), or convert to native text format LCSTREAMFMT_NATIVE (if thisField is not a local type).

Return Value

Value

Description

newStream

LCStream. The value of the index th data element of thisField.

Example

Option Public
Uselsx "*lsxlc"  
Sub Initialize
  Dim Fld As New LCField (LCTYPE_TEXT)
  Fld.Text = "1234.56789"
  Dim vStrm As LCStream
  Set vStrm = Fld.GetStream (1, LCSTREAMFMT_ASCII)
  Print "The Stream representation of the field is " & vStrm.Text
End Sub

Example Output

The Stream representation of the field is 1234.56789.