大虾帮帮忙,
这是错误信息INSERT INTO 语句的语法错误。 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: INSERT INTO 语句的语法错误。
Source Error:
Line 71: OleDbCommand mycommand = new OleDbCommand(aaa,myconnection);
Line 72: mycommand.Connection.Open();
Line 73: mycommand.ExecuteNonQuery();
Line 74: mycommand.Connection.Close();
Line 75: Response.Write("<script language=Javascript>alert('注册成功')</script>");
下面是原代码
往ACCESS添加数据
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+"')";
OleDbConnection myconnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("db1.mdb"));
OleDbCommand mycommand = new OleDbCommand(aaa,myconnection);
mycommand.Connection.Open();
mycommand.ExecuteNonQuery();
mycommand.Connection.Close();
Response.Write("<script language=Javascript>alert('注册成功')</script>");
请高手帮帮吧,谢啦,
Q:153739793