调用 sqlhelper.cs 的例子(存储过程带上多个参数)

 

SqlParameter[] arParms = new SqlParameter[4]; 



arParms[0]   =   New   SqlParameter( "@A ",   SqlDbType.VarChar,   20) 

arParms[0].Value   =   A 



arParms[1]   =   New   SqlParameter( "@B ",   SqlDbType.VarChar,   20) 

arParms[1].Value   =   B 



arParms[2]   =   New   SqlParameter( "@C ",   SqlDbType.Int) 

arParms[2].Value   =   C     



SqlHelper.ExecuteNonQuery(strConnectionString,   CommandType.StoredProcedure,   “spName”,   arParms)

 

你可能感兴趣的:(存储过程)