SqlCommand的属性与方法

 
 1. SqlCommand的属性大全

 名稱說明
Public property Supported by the .NET Compact Framework CommandText 覆寫。 取得或設定要在資料來源執行的 Transact-SQL 陳述式或預存程序。
Public property Supported by the .NET Compact Framework CommandTimeout 覆寫。 取得或設定結束執行命令的嘗試並產生錯誤之前的等待時間。
Public property Supported by the .NET Compact Framework CommandType 覆寫。 取得或設定值,指出 CommandText 屬性解譯的方式。
Public property Supported by the .NET Compact Framework Connection 取得或設定這個 SqlCommand 的執行個體所使用的 SqlConnection
Public property Container  取得包含 Component 的 IContainer。 (繼承自 Component)。
Public property DesignTimeVisible 覆寫。 取得或設定值,指出命令物件是否應該在 Windows Form 設計工具控制項中顯示。
Public property Notification 取得或設定值,指定繫結至這個命令的 SqlNotificationRequest 物件。
Public property NotificationAutoEnlist 取得或設定值,指出應用程式是否應該從通用 SqlDependency 物件自動接收查詢告知。
Public property Supported by the .NET Compact Framework Parameters 取得 SqlParameterCollection
Public property Supported by the .NET Compact Framework Site  取得或設定 Component 的 ISite。 (繼承自 Component)。
Public property Supported by the .NET Compact Framework Transaction 取得或設定 SqlTransactionSqlCommand 將會在其中執行。
Public property Supported by the .NET Compact Framework UpdatedRowSource 覆寫。 取得或設定當由 DbDataAdapter 的 Update 方法使用命令結果時,如何套用至 DataRow
回頁首
 


 名稱說明
Protected property CanRaiseEvents  取得值,指出元件是否能引發事件。 (繼承自 Component)。
Protected property DesignMode  取得值,指出 Component 目前是否處於設計模式。 (繼承自 Component)。
Protected property Supported by the .NET Compact Framework Events  取得附加在這個 Component 上的事件處理常式清單。 (繼承自 Component)。

 

2. SqlCommand的方法大全

 名稱說明
Public method BeginExecuteNonQuery 多載。 啟始這個 SqlCommand 所描述之 Transact-SQL 陳述式或預存程序的非同步執行。
Public method BeginExecuteReader 多載。 啟始這個 SqlCommand 所描述之 Transact-SQL 陳述式或預存程序的非同步執行,並從伺服器擷取一或多個結果集。
Public method BeginExecuteXmlReader 多載。 啟始這個 SqlCommand 所描述之 Transact-SQL 陳述式或預存程序的非同步執行,並傳回結果做為 XmlReader 物件。
Public method Supported by the .NET Compact Framework Cancel 覆寫。 嘗試取消 SqlCommand 的執行。
Public method Clone 建立目前執行個體複本的新 SqlCommand 物件。
Public method CreateObjRef  建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。 (繼承自MarshalByRefObject)。
Public method CreateParameter 建立 SqlParameter 物件的新執行個體。
Public method Supported by the .NET Compact Framework Dispose  多載。 釋放 Component 所使用的資源。 (繼承自 Component)。
Public method EndExecuteNonQuery 完成 Transact-SQL 陳述式的非同步執行。
Public method EndExecuteReader 完成 Transact-SQL 陳述式的非同步執行,傳回要求的 SqlDataReader
Public method EndExecuteXmlReader 完成 Transact-SQL 陳述式的非同步執行,以 XML 傳回要求的資料。
Public method Supported by the .NET Compact Framework Equals  多載。 判斷兩個 Object 執行個體是否相等。 (繼承自 Object)。
Public method Supported by the .NET Compact Framework ExecuteNonQuery 覆寫。 針對連接執行 Transact-SQL 陳述式,並傳回受影響的資料列數目。
Public method Supported by the .NET Compact Framework ExecuteReader 多載。 將 CommandText 傳送至 Connection,並建置 SqlDataReader
Public method Supported by the .NET Compact Framework ExecuteScalar 覆寫。 執行查詢,並傳回查詢所傳回的結果集第一個資料列的第一個資料行。會忽略其他的資料行或資料列。
Public method Supported by the .NET Compact Framework ExecuteXmlReader 將 CommandText 傳送至 Connection,並建置 XmlReader 物件。
Public method Supported by the .NET Compact Framework GetHashCode  做為特定型別的雜湊函式。GetHashCode 很適合用在雜湊演算法和資料結構中 (例如雜湊資料表)。 (繼承自 Object)。
Public method GetLifetimeService  擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。 (繼承自 MarshalByRefObject)。
Public method Supported by the .NET Compact Framework GetType  取得目前執行個體的 Type。 (繼承自 Object)。
Public method InitializeLifetimeService  取得存留期服務物件來控制這個執行個體的存留期原則。 (繼承自 MarshalByRefObject)。
Public method Supported by the .NET Compact Framework Prepare 覆寫。 在 SQL Server 的執行個體上建立命令的預備版本。
Public method Static Supported by the .NET Compact Framework ReferenceEquals  判斷指定的 Object 執行個體是否為相同的執行個體。 (繼承自 Object)。
Public method Supported by the .NET Compact Framework ResetCommandTimeout 重設 CommandTimeout 屬性為其預設值。
Public method Supported by the .NET Compact Framework ToString  傳回 String,其中可能含有 Component 的名稱。這個方法不應該被覆寫。 (繼承自 Component)。

 

  

posted @ 2012-09-03 13:31  C#老头子  Views(2106)  Comments(0Edit  收藏  举报