title: Insert record into Access 2000 database in C#
body: <p>I need to insert a record in Access 2000 database using C#. The code fails at the SqlConnection. Please help.</p>
  
  <pre><code>        string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Trading.mdb";
          string commandText = "INSERT INTO Order (OpenDate) VALUES (@OpenDate)";
  
          using (SqlConnection connection = new SqlConnection(connectionString))
          {
              SqlCommand command = new SqlCommand(commandText, connection);
              command.Parameters.AddWithValue("@OpenDate", DateTime.Now);
  
              try
              {
                  command.Connection.Open();
                  int response = command.ExecuteNonQuery();
              }
              catch (Exception ex)
              {
                  MessageBox.Show("Error: {0}" + ex.Message);
              }
          }            
  </code></pre>