TeamFoundationSqlResourceComponent.AddStatement Method (String, Int32, Boolean, Boolean)

Add a statement to the current SQL batch. You must call [PrepareSqlBatch] before you call [AddStatement]. If the number of parameters that will be added by using this statement will exceed the maximum number of allowed parameters in a single SQL batch, the statements that are already part of the batch will be executed, and then a new batch will begin with the statement that's being added.

Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)


Protected Function AddStatement ( _
    sqlStatement As String, _
    parameterCount As Integer, _
    allowExecute As Boolean, _
    addStatementIndex As Boolean _
) As Integer
protected int AddStatement(
    string sqlStatement,
    int parameterCount,
    bool allowExecute,
    bool addStatementIndex
int AddStatement(
    String^ sqlStatement, 
    int parameterCount, 
    bool allowExecute, 
    bool addStatementIndex
member AddStatement : 
        sqlStatement:string * 
        parameterCount:int * 
        allowExecute:bool * 
        addStatementIndex:bool -> int
protected function AddStatement(
    sqlStatement : String, 
    parameterCount : int, 
    allowExecute : boolean, 
    addStatementIndex : boolean
) : int


  • sqlStatement
    Type: System.String

    SQL statement to add to the batch.

  • parameterCount
    Type: System.Int32

    Number of parameters that will be bound after this statement.

  • allowExecute
    Type: System.Boolean

    Allow execution of the partial batch if there are too many parameters.

  • addStatementIndex
    Type: System.Boolean

    Treat statement as format string and replace "{0}" with zero-based statement index.

Return Value

Type: System.Int32

.NET Framework Security

See Also


TeamFoundationSqlResourceComponent Class

AddStatement Overload

Microsoft.TeamFoundation.Framework.Server Namespace