Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I drag and drop a Table (which I added by "Data Source Configuration Wizard" ) on the
form .as you know visual studio create TableAdapter,DataSet ,..and adds some code automatically .
but when I delete a row and want to save it gives error :
<<update requires="" a="" valid="" deletecommand="" when="" passed="" datarow="" collection="" with="" deleted="" rows.="">>


private void nameBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.nameBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.dtDataSet);//Error occurs here 

        }
Posted

It's quite obvious, you haven't supplied a delete command. The wizards will get you started but there are still some things you must do.
 
Share this answer
 
well , what should I do then ?!!!!!:confused:
 
Share this answer
 
1 - don't push 'answer' unless you have an answer to post
2 - supply a delete command
2a read the documentation if you need to
2b if you want to write decent code, don't use this drivel, write a proper data layer
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900