GetString Method (ADO Recordset)

Returns the Recordset as a string. One of three formats is used to delimit the Recordset rows and columns.

Syntax

Set Variant = recordset.GetString(StringFormat, NumRows, ColumnDelimiter, RowDelimiter, NullExpr)

Return Value

Returns the Recordset as a string-valued Variant (BSTR).

Parameters

StringFormat Specifies that the Recordset should be converted to the following format.

adClipString Rows are delimited by RowDelimiter, columns by ColumnDelimiter, and NULL values by NullExpr. These three parameters are valid only with adClipString.

NumRows Optional. The number of rows in the recordset to convert. If NumRows is not specified, or if it is greater than the total number of rows in the recordset, then all the rows in the recordset are converted.

ColumnDelimiter Optional. Delimiter used between columns if specified, otherwise the TAB character.

RowDelimiter Optional. Delimiter used between rows if specified, otherwise the CARRIAGE RETURN character.

NullExpr Optional. Expression used in place of a NULL value if specified, otherwise the empty string.

Remarks

Row data, but no schema data, is saved to the string. Therefore, a recordset cannot be reopened using this string.

This method is equivalent to the RDO GetClipString method.