Delete error with windows 2003

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.


}
 
R

Rad [Visual C# MVP]

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,244
Latest member
cryptotaxsoftware12

Latest Threads

Top