Results 1 to 3 of 3

Thread: [resolved] Deleting record and seeing it updated immediately

  1. #1

    Thread Starter
    Addicted Member SaharaWizard's Avatar
    Join Date
    Nov 2004
    Location
    Canada
    Posts
    254

    Resolved [resolved] Deleting record and seeing it updated immediately

    Hello Guys
    In a form I have a little datagrid that is bound to an ADODC recordset (I know bound is not a good solution but there is a reason for using it here). This grid just lists Id and Name.
    When user pick up on item in the list this record is SELECTED from database and all the details (different columns in table) is shown in various texboxes in the form (using code and not bounding).
    Problem is that I want to be able to delete some of the records, hence I added a delete buton next to the datagrid and although it does delete the record the record still shows in the datagrid even after it has been deleted!!!
    I have to close and reopen the form to see it gone!
    I tried:

    adodc1.recordset.delete
    Adodc1.refresh
    dataGrid1.refresh
    but no use.
    How can I get rid of the pesky record?
    Ty in advance
    Last edited by SaharaWizard; Feb 3rd, 2005 at 05:10 PM.
    Don't let your schooling get in the way of your education.

  2. #2
    Addicted Member
    Join Date
    Aug 2004
    Posts
    176

    Re: Deleting record and seeing it updated immediately

    Adodc1.Recordset.Requery
    DataGrid1.ReBind
    Does this help?

  3. #3

    Thread Starter
    Addicted Member SaharaWizard's Avatar
    Join Date
    Nov 2004
    Location
    Canada
    Posts
    254

    Yes, thank you

    Yes buddy thank your for your suggestion. It solved the problem.
    Don't let your schooling get in the way of your education.

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