string commandGetIslemIdleri = ("EXEC GetIslemIdleri"); cmd = new SqlCommand(commandGetIslemIdleri, sqlConn); cmd.Parameters.Add(new SqlParameter("@CARIID", 110)); using (var reader = cmd.ExecuteReader())
Above is the code I'm trying to write to invoke the stored procedure below with the parameter CARIID , which is an integer. when I run the code, an error occurs and says "Procedure or function 'GetIslemIdleri' expects parameter '@CARIID', which was not supplied." but as far as I understand from the examples that I read from here , I am sending a parameter with this code cmd.Parameters.Add(new SqlParameter("@CARIID", 110)); I need help, thank you in advance.
ALTER PROCEDURE [dbo].[GetIslemIdleri] @CARIID int AS BEGIN SET NOCOUNT ON; SELECT ID FROM TBLP1ISLEM WHERE TBLP1ISLEM.CARI_ID=@CARIID END
source share