Results 1 to 5 of 5

Thread: how to undelete row in a dataset?

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    10

    how to undelete row in a dataset?

    hi there,
    I want to undelete a row that I previously deleted using "Delete" method.
    I have the primary key of the deleted row, the problem that "Find" method can't search the deleted rows. So I am unable to get reference to the deleted row to call its "rejectchanges" method.

    can anybody help me??

  2. #2
    Hyperactive Member sw_is_great's Avatar
    Join Date
    Nov 2003
    Posts
    330
    if u have not comited try rollback.
    Regards

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    10
    I am working with disconnected data.

    my question about Dataset object that contains a row that I already deleted.

    I wants to undelete a row that I know only its primary key.

    plzzzzzzzzzzzzzzzzzzzzzzzzzzzzz help

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Do a for each loop through the records. Check if it is a deleted row. If so, check its key to see if it matches the key you have. If so, set its rowstate (not sure if that is accurate) to what need to set it.

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    10
    thanx,

    I didn't try this yet, but I think it's going to work..

    I thought there may be built-in solution for this problem in ADO .NET instead of the classic iteration but it seems that ADO .NET is not perfect yet.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width