|
| |
/ J( O- a" D/ g& v# l往ACCESS 添加数据/ C- O% O2 x/ Z7 j2 E
" s& ]" [& q8 i; P: i
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+"')"; " v( y4 H! W- M4 D- ~
OleDbConnection myconnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("db1.mdb"));
8 X$ Q2 m) b; L( S OleDbCommand mycommand = new OleDbCommand(aaa,myconnection); 9 M" Z; d y2 o8 ~0 s+ o
mycommand.Connection.Open();
! d7 \& J$ h3 n! y# @; `" _mycommand.ExecuteNonQuery(); - v& s8 b& F+ S$ X3 [' @
mycommand.Connection.Close();
' R% d7 [% D0 b4 f: ]2 ?: k2 ^4 XResponse.Write("<script language=Javascript>alert('注册成功')</script>");
* J3 h# x. i+ I9 |( f% w
, h) z4 v Y, a- b# m+ c/ \6 p- L# B4 Z, l
老是说INSERT INTO 语句的语法错误
2 N3 W# ?8 C6 k* P: u5 \检查了N变都没发现哪里错(C#的) 2 l- Z0 O; h; h5 z' f7 D( P. O
|
|
|
|