Results 1 to 4 of 4

Thread: Problem with DeleteCommand in C#

  1. #1
    Join Date
    Apr 2009
    Posts
    40

    Problem with DeleteCommand in C#

    Hi,

    I am setting up a small interface. I have a problem.
    I want to create a window in which the future of the software user enter data that could save. My program does not work correctly.
    The error that I get is:

    "Update requires a valid DeleteCommand when crossing the DataRow collection with deleted rows."
    I tried several things but nothing works.

    Thank you for help.

  2. #2
    Join Date
    Feb 2009
    Posts
    81

    Re: Problem with DeleteCommand in C#

    The code that corresponds to the error generated would be welcome this suppose to be consider if we need to implement the Delete command in C#,and for this strong logic should be there to get properly implemented.

    let it be.If you have a code then please show this will help to understand better

  3. #3
    Join Date
    Apr 2009
    Posts
    40

    Re: Problem with DeleteCommand in C#

    Here is the Code:

    Code:
    public partial class Form1: Form 
          ( 
              public Form1 () 
              ( 
                  InitializeComponent (); 
              ) 
    
              private void table1BindingNavigatorSaveItem_Click (object sender, EventArgs e) 
              ( 
                  this. Validate (); 
                  this. table1BindingSource. EndEdit (); 
                  this. tableAdapterManager. updateAll (this. database1DataSet1); 
    
              ) 
    
              private void Form1_Load (object sender, EventArgs e) 
              ( 
                  / / TODO: This line of code loads the data in table 'database1DataSet1.Table1.  You can move or delete according to your needs. 
                  this. table1TableAdapter. Fill (this. database1DataSet1. Table1); 
    
              ) 
          ) 
      )

  4. #4
    Join Date
    Jan 2009
    Posts
    143

    Re: Problem with DeleteCommand in C#

    At what point it will generate the error? during an update?or an addition? That you forget to mention, and that is important.otherwise on the above it looks pefectly all right.

Similar Threads

  1. Sony VGNCS3 laptop 15 inch screen problem...LCD or CHIP problem?
    By Mick$Tyler in forum Hardware Peripherals
    Replies: 5
    Last Post: 31-10-2010, 06:49 AM
  2. Replies: 6
    Last Post: 27-07-2010, 12:10 AM
  3. hard disk problem, clicking sound and windows problem
    By rajat_2589 in forum Hardware Peripherals
    Replies: 1
    Last Post: 16-06-2010, 11:34 PM
  4. Replies: 4
    Last Post: 10-04-2010, 04:19 PM
  5. AD problem in Server 2003, Userenv Event ID 1053 problem
    By Victor Kam in forum Active Directory
    Replies: 3
    Last Post: 24-09-2007, 04:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,390,147.90287 seconds with 16 queries