Freigeben über


TeamFoundationSqlResourceComponent.AddStatement Method (String, Int32, 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)

Syntax

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

Parameters

  • 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 too many parameters.

Return Value

Type: System.Int32

.NET Framework Security

See Also

Reference

TeamFoundationSqlResourceComponent Class

AddStatement Overload

Microsoft.TeamFoundation.Framework.Server Namespace