title: How to create a stored procedure that inserts data into a table from a Visual Studio Application
body: <p>The code I have given is what I have now in my button click event, but instead of directly inputting the SQL statement I need to use a stored procedure. So basically I need to convert this code from Visual Studio 2010 into a stored procedure in SQL Server 2008.</p>
  
  <pre><code>command.Connection = conn;
          command.CommandType = CommandType.Text;
          command.CommandText = **"INSERT INTO Customer VALUES(" + txtCustID.Text + ",'"+        txtFirstName.Text + "', '" + txtSurname.Text + "', " + txtAge.Text + ")";**
          command.Connection.Open();
  
          adapter.InsertCommand = command;
          adapter.InsertCommand.ExecuteNonQuery();
  
          command.Connection.Close();
          Clear();
  </code></pre>