Re: IRowsetResynch/IRowsetRefresh
"James Brophy (CharcolOnline)" <[email protected]> Wed, 5 Jun 2002 15:23:39 +0100
| Newsgroups | gmane.comp.windows.devel.oledb.devel |
|---|---|
| Message-ID | <0C2B60E78DA5D311B20800508B61B6C0013D7D15@JC_LINT> |
Mark, It might be quite pedestrian but a simple way is to include a timestamp field in each updatable table. Note: I'm talking about the SQL hexidecimal datatype not a simple datetime field. Every query to the database should bring this back to the client. On any update operation (inc. delete) the timestamp in the database is compared with the timestamp from the client. If the two are not the same, then the row has changed. James -----Original Message----- From: Mark Dawson [mailto:[email protected]] Sent: 05 06 2002 15:05 To: [email protected] Subject: Re: [OLEDB_DEV] IRowsetResynch/IRowsetRefresh Thanks for correcting me Bob, Shame though, I think Microsoft missed a trick there - the amount of clients who are intersted in changes made by other people must be significant. One way round it I thought of in the past (but never got round to trying) was to have all updates pass through stored procedures. These SPs could then invoke a COM object (via the sp_OA* SPs) which posted a message to a well known message queue. Interested clients can then just connect to the message queue and listen for events. Of course things have moved on since this idea was conceived and other technologies such as the COM+ event system might be more appropriate than message queue. Has anyone else implemented or thought of possible solutions to this? I'd be interested to hear them. Mark -------------------------------------------------------------- Mark Dawson ([email protected]) Software Project Leader Schenck Test Automation Ltd. Lowesmoor Wharf, Worcester. WR1 2RS. UK +44 (0)1905 613361 -----Original Message----- From: Beauchemin, Bob [mailto:[email protected]] Sent: 05 June 2002 14:56 To: [email protected] Subject: Re: [OLEDB_DEV] IRowsetResynch/IRowsetRefresh IRowsetNotify is to notify listeners in the same process (for example, notify a chart control that a grid control's data in the same process has changed. You won't get notifications from the database using this. OTOH, unless you have a server cursor, and, in some cases, a transaction, you won't get any rows from IRowsetResync/Refresh polling the database either. Bob Beauchemin [email protected] -----Original Message----- From: Mark Dawson [mailto:[email protected]] Sent: Wed 6/5/2002 1:04 AM To: [email protected] Cc: Subject: Re: [OLEDB_DEV] IRowsetResynch/IRowsetRefresh You'd be better off using the IRowsetNotify events interface as this will inform you of changes instead of you polling the DB. I haven't used the event notifications but there's plenty in the help about them. Cheers, Mark -------------------------------------------------------------- Mark Dawson ([email protected]) Software Project Leader Schenck Test Automation Ltd. Lowesmoor Wharf, Worcester. WR1 2RS. UK +44 (0)1905 613361 -----Original Message----- From: Massimiliano Alberti [mailto:[email protected]] Sent: 02 June 2002 18:25 To: [email protected] Subject: [OLEDB_DEV] IRowsetResynch/IRowsetRefresh Can someone give me a working example of one of these two interfaces? I need to do a query to the DBMS (SQL Server 2000) and then every X seconds (where X is customizable) I want to ask to the DBMS if there are new/modified rows... Bye Max You can read messages from the OLEDB_DEV archive, unsubscribe from OLEDB_DEV, or subscribe to other DevelopMentor lists at http://discuss.develop.com. ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ You can read messages from the OLEDB_DEV archive, unsubscribe from OLEDB_DEV, or subscribe to other DevelopMentor lists at http://discuss.develop.com. bjzi z kax U*-+{.n+ ,@ Eh.˛ mh"^7zZ)1 b 6 m.2^=h%& ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ You can read messages from the OLEDB_DEV archive, unsubscribe from OLEDB_DEV, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the OLEDB_DEV archive, unsubscribe from OLEDB_DEV, or subscribe to other DevelopMentor lists at http://discuss.develop.com.