If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > looking for new data using select once

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-21-04, 07:07
marconi8 marconi8 is offline
Registered User
 
Join Date: May 2003
Posts: 50
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
Reply With Quote
  #2 (permalink)  
Old 02-21-04, 08:14
rami.haddad rami.haddad is offline
Registered User
 
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...

Quote:
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
Reply With Quote
  #3 (permalink)  
Old 02-21-04, 09:09
marconi8 marconi8 is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 02-21-04, 09:42
rami.haddad rami.haddad is offline
Registered User
 
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.

Quote:
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On