该用户从未签到
|
| | 0 U" b1 Y- A5 k% a- o2 U
往ACCESS 添加数据- |& v4 R2 y! r; w% Z* C7 e4 P. A. u
2 \* v3 a* ~' H7 V e
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+"')"; # Y8 F# m- E* i: g7 c m
OleDbConnection myconnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("db1.mdb"));
9 d& |6 W5 y3 K8 n$ o" W# Z OleDbCommand mycommand = new OleDbCommand(aaa,myconnection); 8 A0 G0 p6 Q$ I: h) W
mycommand.Connection.Open();
4 o; C/ j% Q; K6 P7 lmycommand.ExecuteNonQuery();
4 h6 g3 j! o/ Q9 E2 Wmycommand.Connection.Close();
2 [7 n2 k" K2 Z( Z% w8 zResponse.Write("<script language=Javascript>alert('注册成功')</script>");
4 B8 ]" @) F2 n! s
/ I& H' E: |; ~- g/ | [/ E! x" u6 T* w; _6 ?% S8 B1 Z
老是说INSERT INTO 语句的语法错误 ( S8 G" G* B2 z+ W8 p8 r
检查了N变都没发现哪里错(C#的) $ g7 n4 U) z8 I; i
|
|
|
|