DELETE FROM Attendance_Table
WHERE
(Day_Dat = getdate())
it gives me error of
Procedure procedure_name has no parameters and arguments were supplied.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Akkiraju IvaturiRank #473 · 5.3K reputationPosted Jan 20, 2013, 1:32 PM EST
By the way the error says that you have created a stored procedure called procedure_name which does not accept any parameters. But you were trying to pass parameters to the stored procedure which it cannot handle and so giving the error.
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 20, 2013, 6:17 PM EST
I think this error is due to mismatch between Parameter of SP and Pass parameter to call SP from Code.
Also Check direction of SP parameter. whether parameter is define input/output ect.
yes agree with Akkiraju,
please share you SP .
ahmed fahd57 reputationPosted Jan 21, 2013, 9:39 PM EST
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 21, 2013, 10:06 PM EST
i have try following code C# with SQL server. it working fine for me.
SqlConnection con = new SqlConnection("Data Source=.\SQLExpress;user id=sa;password=tiger1!;Initial Catalog=TempDBforTest;MultipleActiveResultSets=True");
SqlCommand command = new SqlCommand();
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "Attendance_Table_Delete";
command.Connection = con;
con.Open();
int res = command.ExecuteNonQuery();
con.Close();
CREATE PROCEDURE dbo.Attendance_Table_Delete
as
DELETE FROM Attendance_Table WHERE (Day_Dat =convert(date, GETDATE()))
hope this will help you.
ahmed fahd57 reputationPosted Jan 21, 2013, 10:10 PM EST