次の方法で共有


ExecuteWithResults Method

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The ExecuteWithResults method executes a Transact-SQL command batch returning batch result sets in a QueryResults object.

構文

object
.ExecuteWithResults(
Command 
, [ Length ] )asQueryResults

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • Command
    String that specifies a Transact-SQL or provider-specific command batch.
  • Length
    Optional. Long integer that indicates the statement batch length.

Prototype (C/C++)

HRESULT ExecuteWithResults(
SQLDMO_LPCSTR Command,
LPSQLDMOQUERYRESULTS* ppResults,
long lLength);

Returns

A QueryResults object.

解説

When using the ExecuteWithResults method with the LinkedServer object, command batch syntax is provider-specified. For more information, see the OLE DB provider documentation.

Applies To:

Database Object

RemoteServer Object

LinkedServer Object

SQLServer Object