|
| |
" s$ x, V/ i/ H0 E, U' ]! y1 s/ ^! i往ACCESS 添加数据
* d! ?6 B$ D- q9 U; X D
% `; ~0 g8 j- B4 t# ~ |string aaa="insert into zhuce(a_name,a_pwd,a_apwd,a_e-mail,a_tel) values('"+TextBox1.Text+",'"+TextBox2.Text+"','"+TextBox3.Text+"','"+TextBox4.Text+"','"+TextBox5.Text+"')";
2 _* s/ j s0 l/ U. wOleDbConnection myconnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("db1.mdb")); % I7 q) E I- O) M" D
OleDbCommand mycommand = new OleDbCommand(aaa,myconnection);
. b0 p' W. ^. ]: Bmycommand.Connection.Open();
/ X) d; _+ a# X# z- H; s+ `mycommand.ExecuteNonQuery();
1 h; Z2 P( z8 u6 B6 G9 [* \mycommand.Connection.Close();
y6 e; f1 H! K9 F' D# `Response.Write("<script language=Javascript>alert('注册成功')</script>"); 2 t. G% S( p9 g( \: }
4 L( ?+ h. `8 k4 D9 |" A; ~8 i2 k: M$ M: s. Z8 ]+ `2 T
老是说INSERT INTO 语句的语法错误 3 x) h i E7 w4 c+ P, b# Y
检查了N变都没发现哪里错(C#的)
! M1 G" ], D V* b/ |6 R# d |
|
|
|