该用户从未签到
|
| | ' u4 i* R( }$ ^# _8 z* ^/ b2 R
往ACCESS 添加数据
, Y: A* \8 o& P# i% S2 V+ v! q9 o5 b, o0 \
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+"')"; 0 C1 r* }8 t* E4 B S
OleDbConnection myconnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("db1.mdb")); 7 i' {: q4 o5 B3 D n
OleDbCommand mycommand = new OleDbCommand(aaa,myconnection);
) z8 v }/ _. ?mycommand.Connection.Open(); ( ~9 J; f( {& w# ~- {" t @
mycommand.ExecuteNonQuery(); 3 A0 B7 B, h! w, }) K) `( R# c
mycommand.Connection.Close();
' |# q [# `% J" t' D$ o& B BResponse.Write("<script language=Javascript>alert('注册成功')</script>"); ) z0 E8 D% x8 q9 }! i
& a t7 {9 ?0 b$ \+ O, ~
2 T1 k! y+ ^5 x% d* l2 a4 }老是说INSERT INTO 语句的语法错误
# D' i( [) B( F6 B4 Q' N% s1 E检查了N变都没发现哪里错(C#的) 5 O" e" ~2 T9 h' F$ v: _1 L
|
|
|
|