C#中怎样可以把System.Type转为SqlDbType???
急!
用来实现这个函数的!!
public SqlCommand AddCommandParameter(string strComSql,string [] paraName,string [] ColName,SqlDbType[] sqltype,bool [] isNull,int[] FieldSize)
{
SqlCommand cmm = new SqlCommand();
cmm.CommandText = strComSql;
//cmm.Connection = this.conn;
for(int i=0;i<ColName.Length;i++ )
{
cmm.Parameters.Add(new SqlParameter(paraName[i], sqltype[i], FieldSize[i],
ParameterDirection.Input, isNull[i], ((System.Byte)(0)),
((System.Byte)(0)),ColName[i] , DataRowVersion.Current, null));
}
return cmm;
}