Delete error with windows 2003

  • Thread starter Thread starter Chea Vichet
  • Start date Start date
C

Chea Vichet

help me!

Could not delete from specified tables. with the follwing code
why?

thanks
protected void Button1_Click(object sender, EventArgs e)

{

string CntStr = Server.MapPath("") + @"\App_Data\Survey2007.mdb";

CntStr = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + CntStr +
";Persist Security Info=False";


OleDbConnection Cnt = new OleDbConnection(CntStr.ToString());


OleDbCommand dbCmd = new OleDbCommand("Delete From tbl_password", Cnt);

Cnt.Open();

dbCmd.ExecuteNonQuery(); // error here: Could not delete from specified
tables.


}
 
help me!

Could not delete from specified tables. with the follwing code
why?

thanks
protected void Button1_Click(object sender, EventArgs e)

{

string CntStr = Server.MapPath("") + @"\App_Data\Survey2007.mdb";

CntStr = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + CntStr +
";Persist Security Info=False";

OleDbConnection Cnt = new OleDbConnection(CntStr.ToString());

OleDbCommand dbCmd = new OleDbCommand("Delete From tbl_password", Cnt);

Cnt.Open();

dbCmd.ExecuteNonQuery(); // error here: Could not delete from specified
tables.

}

What is the exact error message?
 
Back
Top