CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 1999
    Location
    Hong Kong
    Posts
    18

    AddNew->Update->Delete->get an error

    Hi, I get an error of "could not locate the row ..." when I delete a row which just added, why ? But it can be deleted when i quit the program and then execute again.
    Thank you !


    private Sub Command1_Click()
    DataEnvironment1.rscncustomer.AddNew
    me.txtCUSTID = "123456"
    me.txtCUSTNAME = "ABC Company"
    DataEnvironment1.rscncustomer.Update
    DataEnvironment1.rscncustomer.Delete
    End Sub






  2. #2
    Join Date
    Dec 1999
    Location
    Germany
    Posts
    26

    Re: AddNew->Update->Delete->get an error

    I'm not sure if this will fix the problem, I have not worked that long with VB yet, but with recordsets I always use a 'MoveLast' before taking any further action, because there you sometimes have the trouble, that the location after the Update is not on the new entry but actually behind it...


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

Featured