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 Overridable Function BindString ( _
parameterName As String, _
parameterValue As String, _
maxLength As Integer, _
behavior As BindStringBehavior, _
dbType As SqlDbType _
) As SqlParameter
protected virtual SqlParameter BindString(
string parameterName,
string parameterValue,
int maxLength,
BindStringBehavior behavior,
SqlDbType dbType
)
protected:
virtual SqlParameter^ BindString(
String^ parameterName,
String^ parameterValue,
int maxLength,
BindStringBehavior behavior,
SqlDbType dbType
)
abstract BindString :
parameterName:string *
parameterValue:string *
maxLength:int *
behavior:BindStringBehavior *
dbType:SqlDbType -> SqlParameter
override 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.StringName of the parameter in the statement.
parameterValue
Type: System.StringValue of the parameter.
maxLength
Type: System.Int32The size of the column that will hold the value. A negative value means unlimited length.
behavior
Type: Microsoft.TeamFoundation.Framework.Server.BindStringBehaviorA BindStringBehavior value that determines how null and empty strings will be handled.
dbType
Type: System.Data.SqlDbTypeA SqlDbType such as NVarChar or VarChar.
Return Value
Type: System.Data.SqlClient.SqlParameter
The newly created and initialized sqlparameter.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.