471,071 Members | 1,170 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

Delete error with windows 2003

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.
}
Dec 30 '06 #1
2 997
"Chea Vichet" <vi*********@nida.gov.khwrote in message
news:OU**************@TK2MSFTNGP03.phx.gbl...
help me!
1) Launch your internet browser (e.g. IE, Netscape, Opera, FireFox etc)

2) Navigate to http://www.google.com

3) Enter the text below in the box:

"Could not delete from specified tables"

4) Hit the button
Dec 30 '06 #2
On Fri, 29 Dec 2006 11:51:43 +0700, Chea Vichet wrote:
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?

--
Bits.Bytes
http://bytes.thinkersroom.com
Dec 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Tony Wright | last post: by
23 posts views Thread by da Vinci | last post: by
16 posts views Thread by Philip Boonzaaier | last post: by
1 post views Thread by Keith | last post: by
4 posts views Thread by Matthew Louden | last post: by
5 posts views Thread by wo20051223 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.