该用户从未签到
|
| |
: P# _% v2 ?/ P# G. W; w! d& N往ACCESS 添加数据
6 u/ U2 l- h ?) H+ E# B h! ]* C0 z
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+"')";
! |9 A" u% ^3 s" KOleDbConnection myconnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("db1.mdb")); ' m1 G. Y+ O5 e* s7 X# m! X( ]
OleDbCommand mycommand = new OleDbCommand(aaa,myconnection);
. F0 c/ H8 K0 h0 A- Z; smycommand.Connection.Open();
7 e4 d* [1 o" @mycommand.ExecuteNonQuery(); % e! z. o8 A3 B4 b$ K9 x
mycommand.Connection.Close();
# t/ k. B# M4 m9 Q, ZResponse.Write("<script language=Javascript>alert('注册成功')</script>"); % p- k; C1 S' R3 d8 Y1 j
5 [1 A# e# J" ]6 f W
7 k6 w6 P# @; X9 D |5 g
老是说INSERT INTO 语句的语法错误 % T+ b7 K6 _3 |6 `1 K* I5 l$ [
检查了N变都没发现哪里错(C#的)
2 q4 H a" W+ p8 K7 [0 M+ |2 f' l |
|
|
|