Results 1 to 1 of 1

Thread: VB6 Using a Data Control compared to a ADODC control.

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2016

    VB6 Using a Data Control compared to a ADODC control.


    I am working on an old program written to access a database. Originally, the program used a Data Control to allow the user to move through a recordset and display the fields from the current record in a series of bound controls on the form. The data control was accessing a Microsoft Access database. The program has since been changed to use an ADODC control which accesses an SQL Server database while still displaying the fields in the same bound controls on the form.

    Multiple users are using the program at the same time, so there are update and refresh buttons on the form in order to update any fields which have been changed (using the bound controls) and to refresh the form with any values which may have been changed by other users. On the original program (using the Data Control) when a user would change record (using the buttons on the Data Control to move through the recordset) the recordset automatically refreshes. So if one user changes a record, another user can view the changes simply by moving to that record using the buttons. However, on the new version (using the ADODC control) this does not happen. If a user changes some data in one of the records and then presses the update button, and then another user moves to that record using the buttons on the ADODC control, the user sees the old data (not the updated data that the first user changed).

    Hopefully you understand the problem that i'm facing and I would appreciate any insight into why this is happening/how to fix it.




    Just to clarify, here is the code that I am using for updating and refreshing the recordset with the ADODC control:

    However the Data Control seemed to refresh when moving the record pointer whereas the ADODC control only refreshes when I call the refresh event.
    Last edited by Hustey; Apr 27th, 2017 at 03:33 AM. Reason: Extra info

Tags for this Thread

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