OleDbConnection con=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=data.mdb");
con.Open();
OleDbCommand dc=new OleDbCommand("select title from article where id=1", con);
textBox1.Text=dc.ExecuteScalar().ToString();
OleDbConnection con=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=data.mdb");
con.Open();
OleDbCommand dc=new OleDbCommand("insert into article(title) values ('www.51dev.com')", con);
dc.ExecuteNonQuery();
con.Close();
string title=textBox1Text;
string creatate=textBox2.Text;
OleDbConnection con=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=data.mdb");
OleDbCommand oldC=new OleDbCommand("insert into article(title, creatate) values (@title, @creatate)", con);
oldC.Parameters.Add("@title", us);
oldC.Parameters.Add("@userpassword", creatate);
con.Open();
oldC.ExecuteNonQuery();
con.Close();
MessageBox.Show("Register successful!");
this.Dispose();