Hello, Wayne! >I am using SQL Server 2000 with Delphi 7. > >Sharing the same DB. There are two Clients sharing the same > DB with a DBgrid control on both. > >When one client changes the DB , I would like to see the change >appear on the second client's DBgrid. How can I do that without >refreshing the query and changing the current display on the second >client? I want to see just the data change on the second client and >nothing else.
The same old problem: who to notify multiple client DB applications of changes, made in underlying dataset! It is not the problem of refreshing query - you can refresh effectively only one record (just define proper SQLRefresh expression in your Query component). It is a problem of choosing proper notification mechanism. Many database vendors have built-in notifications like alerters in Oracle and Interbase. It is the best way to synchronize client applications - the database itself is responsible for that. As I remember, SQL Sever doesn't have any notifications like Alerters in Oracle or Interbase (may be I'm wrong? - I hadn't worked with SQL Server for a long time). But, anyway, you can try to: 1. implement some timed refresh (which you are trying to avoid) 2. implement notification from database in AfterUpdate trigger (I don't know, whether it can be done with SQL Server) 3. implement a kind of interprocess communication within client applications, notifying of dataset changes. For example: create and register user-defined windows message and pass it between applications to notify of changes. When your applications run on the same workstation, it is rather simple, but communication over the network poses many problems. I had tried the third approach in my applications, but finally switched to alerters mechanism (as I work with Oracle). The fact is that you have to spend too much effort to implement in your code the thing, which is already present in your database. Best regards, Pavel Evarestov [Non-text portions of this message have been removed] ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

