请看下面的代码:
SqlCommand aCommand = new SqlCommand("RegionInsert", conn); aCommand.CommandType = CommandType.StoredProcedure;
aCommand.Parameters.Add(new SqlParameter("@RegionDescription", SqlDbType.NChar, 50, "aRegionDescription"));在定义参数时,"aRegionDescription"是不是定义成什么值都可以,比如"test","asdf"等等,它有什么用?
SqlCommand aCommand = new SqlCommand("RegionInsert", conn); aCommand.CommandType = CommandType.StoredProcedure;
aCommand.Parameters.Add(new SqlParameter("@RegionDescription", SqlDbType.NChar, 50, "aRegionDescription"));在定义参数时,"aRegionDescription"是不是定义成什么值都可以,比如"test","asdf"等等,它有什么用?
比如你传入的参数是流水号id
那肯定就是int型