我在连接访问时遇到问题,然后出现错误找不到文件'C:\ Users \ Geeta \ Desktop \ test1.mdb'。我的代码是:
protected void btn_submit_Click(object sender, EventArgs e)
{
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection();
// TODO: Modify the connection string and include any
// additional required properties for your database.
conn.ConnectionString = (@"Provider=Microsoft.Jet.OLEDB.4.0;Data source= C:\Users\Geeta\Desktop\test1.mdb");
conn.Open();
string query = "insert into test (First Name,Address,Email,Password) values ('" + txt_fstname.Text + "','" + txt_email.Text + "', '"+txt_pass.Text+"', '"+txt_add.Text+"')";
OleDbCommand cmd = new OleDbCommand(query,conn);
cmd.ExecuteNonQuery();
conn.Close();
Response.Redirect("Default.aspx");
}
请帮助我。
“谢谢”