private void button1_Click(object sender, EventArgs e)
{
OleDbConnection conn = new OleDbConnection(DAL.DBConnectionString.ConnectString);
OleDbCommand com = new OleDbCommand();
com.Connection = conn;
com.CommandText = "insert into aa(a,b) values(@a,@b)";
com.Parameters.Add(new OleDbParameter("@a", "a1"));
com.Parameters.Add(new OleDbParameter("@b", DBNull.Value));
conn.Open();
com.ExecuteNonQuery();
conn.Close();
OleDbCommand com2 = new OleDbCommand();
com2.Connection = conn;
conn.Open();
com2.CommandText = "insert into aa(a,b) values(@a,@b)";
com2.Parameters.Add(new OleDbParameter("@a", "a2"));
com2.Parameters.Add(new OleDbParameter("@b", Convert.ToDateTime("1992-1-1")));
com2.ExecuteNonQuery();
conn.Close();
OleDbCommand com23 = new OleDbCommand();
com23.Connection = conn;
conn.Open();
com23.CommandText = "insert into aa(a,b) values(@a,@b)";
com23.Parameters.Add(new OleDbParameter("@a", "a3"));
com23.Parameters.Add(new OleDbParameter("@b", "1993-1-1"));
com23.ExecuteNonQuery();
conn.Close();
MessageBox.Show("OK");
}