看看你的C#调用语句?
//执行存储过程
command = new SqlCommand( "GetDeliverItem ", connection);
//说明命令要执行的是存储过程
command.CommandType = CommandType.StoredProcedure;
//向存储过程中传递参数
command.Parameters.Add(new SqlParameter( "@SampCode ", SqlDbType.VarChar, 30));
command.Parameters.Add(new SqlParameter( "@DeptName ", SqlDbType.VarChar, 100));
command.UpdatedRowSource = UpdateRowSource.None;
command.Parameters[ "@SampCode "].Value = sampCode;
command.Parameters[ "@DeptName "].Value = combSelDeliver.Text.ToString();
//执行命令
dapt.SelectCommand = command;
dapt.SelectCommand.ExecuteNonQuery();
dapt.Fill(dataSet, "test ");
dataView.Table = dataSet.Tables[ "test"];
dataGridView1.DataSource = dataSet.Tables[ "test"];
调试一下,设断点,把实际的sql语句复制出来,粘到sql里,如果报错了再找问题所在。