C# 클래스 SqlCommandExt, code

파일 보기 프로젝트 열기: shendongnian/code

공개 메소드들

메소드 설명
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}))

메소드 상세

AddArrayParameters() 공개 정적인 메소드

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.
리턴 SqlParameter[],