AdomdCommand.ExecuteNonQuery Method

Runs the AdomdCommand without returning any results.

命名空間: Microsoft.AnalysisServices.AdomdClient
組件: Microsoft.AnalysisServices.AdomdClient (in microsoft.analysisservices.adomdclient.dll)

語法

'宣告
Public Function ExecuteNonQuery As Integer
public int ExecuteNonQuery ()
public:
virtual int ExecuteNonQuery () sealed
public final int ExecuteNonQuery ()
public final function ExecuteNonQuery () : int

傳回值

A value of one (1).

例外

例外類型 狀況
AdomdErrorResponseException

The provider returned an error in response.

AdomdUnknownResponseException

The provider sent an unrecognizable response.

AdomdConnectionException

The connection was broken.

System.InvalidOperationException

An error occurred because one of the following conditions was met:

  • The connection was not set.

  • The connection was not opened.

  • Either the CommandText property or the CommandStream property was improperly set.

  • Both the CommandText property and the CommandStream property were set.

  • Neither the CommandText property, nor the CommandStream property, was set.

備註

You can use the ExecuteNonQuery method to run commands that typically do not return a CellSet, such as data definition language (DDL) commands or writeback commands.

執行緒安全性

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

AdomdCommand Class
AdomdCommand Members
Microsoft.AnalysisServices.AdomdClient Namespace