954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

problem using command builder - delete doesn't work

I have a small project in c# and ms-access
I use query builder to manage my tables in ms-access.
the problem is, select qeury works great, update query works great,
delete doesn't work , and there is no error msg!!!!!!1 please help!!

OleDbDataAdapter adapter = new OleDbDataAdapter(); 
                    string queryString = "SELECT [Id],[Name] FROM 
[myTable]"; 
                    cn.ConnectionString = 
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + _conStrName + ";User 
Id=admin;Password=;"; 
                    OleDbConnection connection = new OleDbConnection 
(cn.ConnectionString); 
                    adapter.SelectCommand = new OleDbCommand 
(queryString, connection); 
                    adapter.SelectCommand.CommandText = queryString; 


                    OleDbCommandBuilder builder = new 
OleDbCommandBuilder(adapter); 
                     adapter.Update(ds.Tables["myTable"]); 


                    return ds;*
urania
Newbie Poster
1 post since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

I don't see a Delete command from your code sample. See: http://msdn.microsoft.com/en-us/library/bb177896.aspx

DdoubleD
Posting Shark
996 posts since Jul 2009
Reputation Points: 341
Solved Threads: 233
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: