该用户从未签到
|
| | . q, u7 \. Q( ?% s
往ACCESS 添加数据# H; T; W* P# g9 G2 W6 E( R
8 x* z8 f/ x3 Q: {& O1 f5 Mstring 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+"')"; % m% Q" n* k' b- R T
OleDbConnection myconnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("db1.mdb"));
5 ^8 f0 \0 o6 I5 A0 {( K OleDbCommand mycommand = new OleDbCommand(aaa,myconnection);
$ j4 D1 {5 `% k8 J" J+ [$ Vmycommand.Connection.Open();
6 y( G6 v/ Q8 x+ j2 e' g4 K3 s4 gmycommand.ExecuteNonQuery(); * I+ L. W7 [0 j. d4 n. C$ R
mycommand.Connection.Close();
8 Y4 ]) h9 u1 J" K+ g F7 YResponse.Write("<script language=Javascript>alert('注册成功')</script>");
: z: ~# ~9 y- H' z# t- C" R
. M4 @1 H2 f) n q! T, S" r' c
老是说INSERT INTO 语句的语法错误 * i7 S" q) C4 K7 E/ b6 x- X0 u
检查了N变都没发现哪里错(C#的) ( B& k/ x5 Y( C" d8 k
|
|
|
|