title: What exactly does cmd.ExecuteNonQuery() do in my program
body: <pre><code>string connection = "Provider=Microsoft.JET.OLEDB.4.0;Data Source=D:\\it101\\LoginForm\\App_Data\\registration.mdb";
  
  string query = "INSERT INTO [registration] ([UserID] , [Name] , [Contact_no] , [City]) values (123, 'abc' ,12345, 'pqr')";
  
  OleDbConnection con = new OleDbConnection(connection);
  OleDbCommand cmd = new OleDbCommand();
  cmd.CommandText = query;
  cmd.CommandType = CommandType.Text;
  cmd.Connection = con;
  
  con.Open();
  cmd.ExecuteNonQuery();
  </code></pre>
  
  <p>And what if i do not write cmd.ExecuteNonQuery() at the end of my program? 
  And if the query needs to be executed why is it written executeNonquery() instead of executeQuery()?</p>