TeamFoundationSqlResourceComponent.PrepareSqlBatch 方法 (Int32, Boolean)

設定執行批次 SQL 陳述式。 這個方法會關閉所有現有的命令或讀取器。

命名空間:  Microsoft.TeamFoundation.Framework.Server
組件:  Microsoft.TeamFoundation.Framework.Server (在 Microsoft.TeamFoundation.Framework.Server.dll 中)

語法

'宣告
Protected Overridable Function PrepareSqlBatch ( _
    lengthEstimate As Integer, _
    bindPartitionId As Boolean _
) As SqlCommand
protected virtual SqlCommand PrepareSqlBatch(
    int lengthEstimate,
    bool bindPartitionId
)

參數

  • lengthEstimate
    類型:System.Int32
    字元數的最佳猜測 (在要執行的 SQL 陳述式。不需要精確。
  • bindPartitionId
    類型:System.Boolean
    如果為 True,目前服務主機區域 ID 繫結至 @partitionId

傳回值

類型:System.Data.SqlClient.SqlCommand
初始化的 SqlCommand 物件

.NET Framework 安全性

請參閱

參考

TeamFoundationSqlResourceComponent 類別

PrepareSqlBatch 多載

Microsoft.TeamFoundation.Framework.Server 命名空間