public void Page_Load(object sender, System.EventArgs e)
{
string Content1,From1;
Content1 = content.Text.ToString().Trim().Replace("'","''").Replace("\n","<br>");
From = UserName.Text.ToString().Trim().Replace("'","''");
DateTime riqi = DateTime.Now;
string MyConnection = "Provider = Microsoft.OleDb.Jet.4.0 ; Data Source =" + Server.MapPath("#dfdfdfsss")+";";
MyConn = new OleDbConnection(MyConnection);
string MySql = "Insert into [index] (from,riqi,content) values ('"+From+"','"+riqi+"','"+Content1+"')";
MyConn.Open();
OleDbCommand MyCommand = new OleDbCommand(MySql,MyConn);
MyCommand.ExecuteNonQuery();
MyConn.Close();
BindGrid();
}请问这段代码为什么不能添加数据到数据库
谢谢