TeamFoundationSqlResourceComponent.BindString Method (String, String, Int32, BindStringBehavior, SqlDbType)

This is a helper function that handles binding strings to their [SqlParameters]. It makes sure that null values are correctly handled.

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

Syntax

'Declaration
Protected Function BindString ( _
    parameterName As String, _
    parameterValue As String, _
    maxLength As Integer, _
    behavior As BindStringBehavior, _
    dbType As SqlDbType _
) As SqlParameter
protected SqlParameter BindString(
    string parameterName,
    string parameterValue,
    int maxLength,
    BindStringBehavior behavior,
    SqlDbType dbType
)
protected:
SqlParameter^ BindString(
    String^ parameterName, 
    String^ parameterValue, 
    int maxLength, 
    BindStringBehavior behavior, 
    SqlDbType dbType
)
member BindString : 
        parameterName:string * 
        parameterValue:string * 
        maxLength:int * 
        behavior:BindStringBehavior * 
        dbType:SqlDbType -> SqlParameter
protected function BindString(
    parameterName : String, 
    parameterValue : String, 
    maxLength : int, 
    behavior : BindStringBehavior, 
    dbType : SqlDbType
) : SqlParameter

Parameters

  • parameterName
    Type: System.String

    Name of the parameter in the statement.

  • maxLength
    Type: System.Int32

    The size of the column that will hold the value. A negative value means unlimited length.

Return Value

Type: System.Data.SqlClient.SqlParameter
The newly created and initialized [sqlparameter].

.NET Framework Security

See Also

Reference

TeamFoundationSqlResourceComponent Class

BindString Overload

Microsoft.TeamFoundation.Framework.Server Namespace