title: passing parameters to a stored procedure in C#
body: <p>How can i send three parameters a to stored procedure in sql?</p>
  
  <p><strong>Here is my error</strong>: Procedure or function GetIslemIdleri has too many arguments specified.</p>
  
  <p><strong>This is my stored procedure:</strong></p>
  
  <pre><code>CREATE PROCEDURE GetIslemDetayIdleri 
  
  @islemId int,
  @dovizTanim nvarchar(10),
  @yapilanIslemTuru nvarchar(20)
  AS
  BEGIN
      SET NOCOUNT ON;
  
  SELECT ([t0].[TOPLAMTUTAR]) + ([t0].[KDVTUTAR]) AS [value]
  FROM [dbo].[TBLP1ISLEMDETAY] AS [t0]
  INNER JOIN [dbo].[TBLP1ISLEM] AS [t1] ON [t1].[ID] = [t0].[ISLEM_ID]
  WHERE ([t0].[ISLEM_ID] = @islemId) AND 
        ([t0].[FIYATBIRIM] = @dovizTanim) AND 
        ([t1].[YAPILANISLEM] = @yapilanIslemTuru) AND 
        ([t0].[KDVDAHILMI] = 0)
  END
  </code></pre>
  
  <p><strong>Here is my code:</strong></p>
  
  <pre><code>        decimal kurToplamQuery = 0;
          string connString = System.Configuration.ConfigurationManager.ConnectionStrings["LocalSqlServer1"].ConnectionString;
  
          SqlConnection sqlConn = new SqlConnection(connString);
          sqlConn.Open();
  
          SqlCommand cmd;
  
          cmd = new SqlCommand("GetIslemIdleri", sqlConn);
          cmd.CommandType = CommandType.StoredProcedure;
          cmd.Parameters.Add(new SqlParameter("@islemId", SqlDbType.Int)).Value = islemId;
          cmd.Parameters.Add(new SqlParameter("@dovizTanim", SqlDbType.NVarChar)).Value = dovizTanim;
          cmd.Parameters.Add(new SqlParameter("@yapilanIslemTuru", SqlDbType.NVarChar)).Value = yapilanIslemTipi;
  
          using (var reader = cmd.ExecuteReader())*//error occurs here*
          {
              while (reader.Read())
              {
                  kurToplamQuery = reader.GetDecimal(0);                    
              }
          }
          sqlConn.Close();
          return kurToplamQuery;
  </code></pre>
  
  <p>Thanks for your helps.</p>