相思资源网 Design By www.200059.com
OleDbConnection con=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=data.mdb");
con.Open();
OleDbCommand dc=new OleDbCommand("select name from us where id=2", 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 us (name) values (11)", con);
dc.ExecuteNonQuery();
con.Close();
string us=textBox2.Text;
string pa=textBox1.Text;
OleDbConnection con=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=data.mdb");
OleDbCommand oldC=new OleDbCommand("insert into users (username, userpassword) values (@username, @userpassword)", con);
oldC.Parameters.Add("@username", us);
oldC.Parameters.Add("@userpassword", pa);
con.Open();
oldC.ExecuteNonQuery();
con.Close();
MessageBox.Show("Register successful!");
this.Dispose();
con.Open();
OleDbCommand dc=new OleDbCommand("select name from us where id=2", 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 us (name) values (11)", con);
dc.ExecuteNonQuery();
con.Close();
string us=textBox2.Text;
string pa=textBox1.Text;
OleDbConnection con=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=data.mdb");
OleDbCommand oldC=new OleDbCommand("insert into users (username, userpassword) values (@username, @userpassword)", con);
oldC.Parameters.Add("@username", us);
oldC.Parameters.Add("@userpassword", pa);
con.Open();
oldC.ExecuteNonQuery();
con.Close();
MessageBox.Show("Register successful!");
this.Dispose();
相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com
暂无asp.net OleDbCommand 的用法的评论...