asp.net使用返回参数的存储过程

1 SqlParameterCollection sqlParams  =  ProjectAddCommand.Parameters;
2 ProjectAddCommand.CommandType  =  CommandType.StoredProcedure;
3 SqlParameter parmsBasicID                     =   new  SqlParameter(BasicID_PARM, SqlDbType.Int);
4 parmsBasicID.Direction                         =  ParameterDirection.Output;
5 sqlParams.Add(parmsBasicID);
6
7 public   bool  ProjectAdds(BasicData basicData, out   int  basicID)
8 basicID  =  Convert.ToInt32(dsCommand.InsertCommand.Parameters[BasicID_PARM].Value);

你可能感兴趣的:(asp.net)