Is there any alternate command of ExecuteNonQuery? : <p>I am making project on Hospital Management Information System using c#, and want to insert data to SQL Server from c#, but ExecuteNonQuery Command is not working. Is there any alternate of this command?</p>

<pre><code>connection.Open();
command = new SqlCommand(sql, connection);
command.CommandType = CommandType.Text;
int i = command.ExecuteNonQuery();

command.Dispose();
connection.Close();
</code></pre>
