GetRangeString Method

QueryResults Object

Description

Returns a single string containing a block of rows and columns from the current result set.

Visual Basic

strOutput = QueryResults->GetRangeString (
[[Top :=] lTop,]
[[Left :=] lLeft,]
[[Bottom :=] lBottom,]
[[Right :=] lRight,]
[[RowDelim :=] strRowDelimiter,]
[[ColDelim :=] strColumnDelimiter,]
[[ColWidths :=] mstrColumnWidthList] )

C++

HRESULT pQueryResults->GetRangeString (
SQLOLE_LPBSTR
pstrOutput,
long
lTop = 0,
long
lLeft = 1,
long
lBottom = -1,
long
lRight = -1,
SQLOLE_LPCSTR
strRowDelimiter = NULL,
SQLOLE_LPCSTR
strColumnDelimiter = NULL,
SQLOLE_LPCSTR
mstrColumnWidthList = NULL );

Elements

Element Type Description

strOutput String Returned block of rows and columns from the current result set.
lTop Long First row to return.
lLeft Long First column to return.
lBottom Long Last row to return.
lRight Long Last column to return.
strRowDelimiter String String placed between each row. The default is the newline string.
strColumnDelimiter String String placed between each column. The default is the tap character.
mstrColumnWidthList MultiString Delimited list of column width values. For a given column, data shorter than the specified width will be padded with spaces to fill the entire width, and data longer than the specified width will be truncated to the width.

If the number of width values is greater than the number of columns requested, the extra width values are ignored. If the number of width values is less than the number of columns requested, the default width values will be used for the last columns.