Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003
    Posts
    50

    Unanswered: looking for new data using select once

    i try to get from you advices to my situation.

    in next example there are 3 pc in one LAN, 2 clients and server.
    On the server is mssql database.

    when client execute application, application trough ado connection get information from mssql database, simple select. Then selected data is stored in the string grid.

    Now when server user inserts new data into database, clients must to know about this new data, but how can they know about new data.

    1 solution is that all clients must to repeat select statement, but is there any solution that clients dont must to execute the same select twice.

    for example if there are new records on the server database then server must to send only new records to the all clients, and new records are only added to the clients application string grids.

    can you give me any advices,
    i try to know how can i realize this task.......


    thanks for help

  2. #2
    Join Date
    Jan 2004
    Posts
    184

    Re: looking for new data using select once

    In ADO there are two options for you either you do a Resync or a Requery.

    The resync only retreives changes that have been made to the existing records or your recordset, but does not retreive new records.

    Requery retreives all records which include all new records. There is no way around that for reteriving new records.

    I recommend this control that has saved me a lot of time and does refresh the recordset as you want:

    http://download.com.com/3000-2404-10...ml?tag=lst-0-1

    Hello everybody, I just wanted to share with you a control featured on download.com that I have been using that has made my life easier:

    http://www.geocities.com/scirocco_ha/DataControl.htm

    This works in any environment VB, Access, VC++ etc...

    Originally posted by marconi8
    i try to get from you advices to my situation.

    in next example there are 3 pc in one LAN, 2 clients and server.
    On the server is mssql database.

    when client execute application, application trough ado connection get information from mssql database, simple select. Then selected data is stored in the string grid.

    Now when server user inserts new data into database, clients must to know about this new data, but how can they know about new data.

    1 solution is that all clients must to repeat select statement, but is there any solution that clients dont must to execute the same select twice.

    for example if there are new records on the server database then server must to send only new records to the all clients, and new records are only added to the clients application string grids.

    can you give me any advices,
    i try to know how can i realize this task.......


    thanks for help

  3. #3
    Join Date
    May 2003
    Posts
    50

    ...

    thank you for help, that means that if i know that on the server are posted new records then clients applications must execute select...

    thanks for control i'll try it.

  4. #4
    Join Date
    Jan 2004
    Posts
    184

    Re: ...

    Yes exactly, you must requery the database to reterive the new records.

    No problem, let me know what you think.

    Originally posted by marconi8
    thank you for help, that means that if i know that on the server are posted new records then clients applications must execute select...

    thanks for control i'll try 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
  •