다음을 통해 공유


GetRangeString Method

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The GetRangeString method returns a single string that contains a block of rows and columns from the current result set of the QueryResults object.

구문

object
.GetRangeString( [ Top ] , [ Left ] , [ Bottom ] , [ Right ] ,
[ RowDelimiter ] , [ ColDelimiter ] , [ ColWidths ] )as String

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • Top
    Optional. Long integer that specifies a starting row in the result set. When no value is specified, the first row in the returned string is formed from the names of columns in the result set.
  • Left
    Optional. Long integer that specifies a starting column in the result set. When no value is specified, the first column marks the left of the extracted range.
  • Bottom
    Optional. Long integer that specifies an ending row in the result set. When no value is specified, the last row marks the bottom of the extracted range.
  • Right
    Optional. Long integer that specifies an ending column in the result set. When no value is specified, the last column marks the right of the extracted range.
  • RowDelimiter
    Optional. String used to delimit rows. When no value is specified, rows are delimited using a carriage return/line feed sequence.
  • ColDelimiter
    Optional. String used to delimit columns. When no value is specified, columns are delimited using a tab character regardless of the setting of the ColWidths argument.
  • ColWidths
    Optional. SQL Distributed Management Objects (SQL-DMO) multistring of integer values that specifies fixed widths for value representation in the string. If no value is specified in the ColDelimiter argument, data is represented in the string at fixed width and with the default tab delimiter.

Prototype (C/C++)

HRESULT GetRangeString(
SQLDMO_LPBSTR pRetVal,
long Top = 0,
long Left = 0,
long Bottom = -1,
long Right = -1,
SQLDMO_LPCSTR RowDelim = NULL,
SQLDMO_LPCSTR ColDelim = NULL,
SQLDMO_LPCSTR ColWidths = NULL);

[!참고] SQL-DMO strings are always returned as OLE BSTR objects. A C/C++ application obtains a reference to the string. The application must release the reference using SysFreeString.

Returns

A string.

주의

When no optional arguments are specified, the GetRangeString method returns a string representation of the entire result set. The first line of text returned contains result set column names. The second line contains hyphen character strings underlining the column names.

For more information about setting multistring parameters, see Using SQL-DMO Multistrings.

Applies To:

QueryResults Object