C# Class SqlCommandExt, code

Afficher le fichier Open project: shendongnian/code

Méthodes publiques

Méthode Description
AddArrayParameters ( SqlCommand, cmd, string paramNameRoot, IEnumerable, values, SqlDbType? dbType = null, int? size = null ) : SqlParameter[],

This will add an array of parameters to a SqlCommand. This is used for an IN statement. Use the returned value for the IN part of your SQL call. (i.e. SELECT * FROM table WHERE field IN ({paramNameRoot}))

Method Details

AddArrayParameters() public static méthode

This will add an array of parameters to a SqlCommand. This is used for an IN statement. Use the returned value for the IN part of your SQL call. (i.e. SELECT * FROM table WHERE field IN ({paramNameRoot}))
public static AddArrayParameters ( SqlCommand, cmd, string paramNameRoot, IEnumerable, values, SqlDbType? dbType = null, int? size = null ) : SqlParameter[],
cmd SqlCommand, The SqlCommand object to add parameters to.
paramNameRoot string What the parameter should be named followed by a unique value for each value. This value surrounded by {} in the CommandText will be replaced.
values IEnumerable, The array of strings that need to be added as parameters.
dbType SqlDbType? One of the System.Data.SqlDbType values. If null, determines type based on T.
size int? The maximum size, in bytes, of the data within the column. The default value is inferred from the parameter value.
Résultat SqlParameter[],