|
| |
7 {$ g ]2 d* \( Y, {往ACCESS 添加数据4 c3 d1 A* s7 \% R0 m, Q, |
, X" K/ c$ [2 c! t* L% k
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+"')"; 3 u; U7 Z" B3 B1 u8 F9 y2 @
OleDbConnection myconnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("db1.mdb"));
6 I: t% o# N5 r1 O) o OleDbCommand mycommand = new OleDbCommand(aaa,myconnection);
9 @+ h5 b" B& S5 B3 j. Dmycommand.Connection.Open(); / n: }1 G& O" `# W! I, y
mycommand.ExecuteNonQuery(); 3 M$ l5 ]9 K4 j" G
mycommand.Connection.Close();
+ t: c5 V" C) h* R3 X5 \/ aResponse.Write("<script language=Javascript>alert('注册成功')</script>"); & q, [, O! M3 I. e$ c7 x
2 q! X- j2 j+ F5 ^) y
2 q) L! ?7 L! P5 y/ W
老是说INSERT INTO 语句的语法错误 ?$ n" R% i I+ t; g
检查了N变都没发现哪里错(C#的) + f2 G1 l* v. D0 c* q; I
|
|
|
|