title: Error on SQL Server Insert stored procedure
body: <p>I'm trying to simply insert data into a table in SQL Server from a C# winforms application.</p>
  
  <p>Currently when the executing the query I'm receiving the error:</p>
  
  <blockquote>
    <p>Incorrect syntax near 'soAddItems'</p>
  </blockquote>
  
  <p>Here is my <code>insert</code> code of the class handling my database CRUD operations:</p>
  
  <p>Note: As test data:  </p>
  
  <ul>
  <li>itemName = "test"</li>
  <li>skuNo = "a123"</li>
  <li>itemPrice = 2.99</li>
  <li>stockItemToAdd = 3</li>
  <li>itemPic = "C:\Users\Name\Pictures\pic.png"**</li>
  </ul>
  
  <p>Code:</p>
  
  <pre><code>public virtual void AddItem(string itemName, string skuNo, double itemPrice, int stockAmountToAdd, string itemPic)
  {
          using (SqlConnection open = new SqlConnection(connectionString))
          {
              SqlCommand insertCommand = new SqlCommand("soAddItems", open);
  
              open.Open();
  
              insertCommand.Parameters.Add("@itemName", SqlDbType.NChar).Value = itemName;
              insertCommand.Parameters.Add("@skuNo", SqlDbType.VarChar).Value = skuNo;
              insertCommand.Parameters.Add("@itemPrice", SqlDbType.Decimal).Value = itemPrice;
              insertCommand.Parameters.Add("@instockAmount", SqlDbType.BigInt).Value = stockAmountToAdd;
              insertCommand.Parameters.Add("@lastSold", SqlDbType.DateTime).Value = DateTime.Today;
              insertCommand.Parameters.Add("@itemPic", SqlDbType.NChar).Value = itemPic;
  
              //***** Error on the execute*****
              insertCommand.ExecuteNonQuery();
          };
      }
  </code></pre>
  
  <p>SQL Server stored procedure:</p>
  
  <pre><code>ALTER PROC [dbo].[soAddItems]
     @itemName nchar,
     @skuNo varchar,
     @itemPrice float,
     @instockAmount bigint,
     @lastSold dateTime, 
     @itemPic varchar
  AS
  BEGIN
      INSERT INTO items (itemName, skuNo, itemPrice, instockAmount, lastSold, itemPic) 
      VALUES (@itemName, @skuNo, @itemPrice, @instockAmount, @itemPic)
  END
  </code></pre>
  
  <p>Can anyone tell me where I'm going wrong?</p>