Results 1 to 6 of 6

Thread: problem in datatable.acceptchanges

  1. #1

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    problem in datatable.acceptchanges

    i am using the following code:
    if i use this code it deletes the row in dataset.tables(0) but after that i am using to update the dataset da.update(ds) but it is not gettting updated. value remais i dont know why? please help me to solve this please
    Loving dotnet

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: problem in datatable.acceptchanges

    Where's your code?

  3. #3

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    Re: problem in datatable.acceptchanges

    dear mendhak,

    sorry fo rdidn't attach friend, i have resolved the problem. thanks for the attention.
    Loving dotnet

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: problem in datatable.acceptchanges

    Another job well done by yours truly.

  5. #5
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: problem in datatable.acceptchanges

    Most likely it's because you're calling AcceptChanges() before updating your database. You need to know that AcceptChanges will reset the rowstates of any new or modified datarows to unchanged, and remove the rows with rowstate = deleted from the datatable. So once you call AcceptChanges on your datatable, you your dada adapter will see no new/modified/deleted rows in the datatable and nothing will be changed in your database.

  6. #6

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    Re: problem in datatable.acceptchanges

    thank you friends for attention to my thread
    Loving dotnet

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