title: SQLCommand causing duplicate Stored Proc executions
body: <p>I got an issue that I am completely stumped on.</p>
  
  <p>Part of my application calls a Stored Proc using SQLConnection/SQLCommand. I'm hitting a SQL 2005 database and I am able to make the connection and execute the SP just fine. The problem is it periodically executes the SP multiple times; some times twice, some times three times.</p>
  
  <p>This is basically how I execute the SP...</p>
  
  <pre><code>Dim conString As String = "&lt;Typical Connection String&gt;"
  Dim cn As SqlConnection = new SqlConnection(conString)
  Dim cmd As SqlCommand = New SqlCommand("dbo.JobStoredProc", cn)
  cmd.CommandType = CommandType.StoredProcedure
  cmd.Parameters.Add("@Val", SqlDbType.VarChar, 12).Value = "Test Value"
  cn.Open()
  Dim queryResult As Integer = cmd.ExecuteNonQuery
  cn.Close()
  cn.Dispose()
  </code></pre>
  
  <p>I can't figure out why sometimes it executes only once, but other times it executes multiple times. Is there something I'm missing? Is there a better way to go about executing the SP?</p>
  
  <p>Thank you very much in advance!</p>