insert into 语法错误 找不出哪里错了 帮忙啊!!!
public void Button_Click(object Source,EventArgs e)
{
string exce="insert into jzgjbxx(Time,Name) values('"+Time.Text.ToString()+"','"+Name.Text.ToString()+"')";
if ((Time.Text=="")||(NO.Text==""))
Label1.Text="日期和编号不能为空";
else if (Name.Text=="")
Label1.Text="名字不能为空";
else
{
Label1.Text="正常提交";
OleDbConnection myConnection = new OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0;Data Source = "+Server.MapPath("Database\\hrm.mdb"));
OleDbCommand myCommand = new OleDbCommand(exce,myConnection);
myCommand.Connection.Open();
myCommand.ExecuteNonQuery();
myCommand.Connection.Close();
Response.Redirect("WebForm1.aspx");
}
Time,Name 都是文本 这样怎么提示 insert into 语法错误 是哪里错了啊