SQL::RowFormattingOptions Object

Description

Options for formatting string output from a result set.

Discussion

The SQL::RowFormattingOptions object describes options for formatting string output from a result set. You can set the row terminators and column delimiters and provide escapement values that will be used when the row terminator or column delimiter values occur within the data itself. The DisplayFormat option is used to control handling of binary data and typed information.

Properties

ColumnSeparatorCharacter

Default = "\t". The separator used between column values.

ColumnSeparatorEscapeCharacter

Default = "". If the row data contains the specified ColumnSeparator, it is replaced with the ColumnSeparatorEscape. The default value of an empty string means the ColumnSeparator, if found in the data for a row, will be deleted.

DateFormatCharacter

An Xbasic format string to be used when formatting Date (type D) column values.

LogicalFormat

Setting this value overrides the behavior of DisplayFormat. Set the property to any one (but only one) of the following values: 0, 1, TRUE, FALSE, True, False, true, false, .t., .f.. The formatter will infer the complementary value. For example, if you provide a format of "TRUE", false values will display as "FALSE". The case of true and false value pairs will matched the value you provide.

DateTimeFormatCharacter

An Xbasic format string to be used when formatting DateTime (type T) column values.

DisplayFormatLogical

Default = .t.. Indicates whether or not data should be formatted for display in a page or dialog. If .f., data will not be formatted. If .t., data fields such as binary data and logical fields will be formatted for best display in a page or dialog. IE:

  • Binary data is displayed as the literal "<binary data>"" rather than being embedded in the generated output.
  • Logical data will display as T or F rather than .t. and .f..
  • Date, time, and datetime values will be displayed in the default date display format rather than the canonical format (such as YYYY-MM-DD).
  • Geography types will be converted to Well-Known-Text format.
  • Note: DisplayFormat is ignored if the column type is date and a date format is specified or the column type is datetime and a datetime format has been specified.
RowTerminatorCharacter

Default = crlf(). The separator used between rows. Default is a newline (crlf()).

RowTerminatorEscapeCharacter

Default = "". If the row data contains the specified RowTerminator, it is replaced with the RowTerminatorEscape. The default value of an empty string means the RowTerminator, if found in the data for a row, will be deleted.