Yes I know I avoided mentioning DCOM and Events but this of course I have
used such an approach.myself and pretty powerful it is to DCOM using C++.
Its this multi tier business rule approach to problems.
The point I was making was of course a middle layer that would
apply the business rules and monitor the in this case SQL locally.
The question of course is quite innocent detecting changes to data
files record counts etc. But in SQL off course with thousands
of potential hits almost simultaneously these are of very secondary
concern.
SQL is terrific but is a 3GL language and one of the beneifits of DCOM is to
present an Object interface to your SQL operations. This can get you out of all
sorts of problems. i.e. applying business logic in ASP is not a good idea
ADO is of course excellent but I still prefer to see the SQL at the local
rather than the remote end.
"Cole, R. MR DOIM" <8r8251@e...> wrote:
Why not use the Com+ Event services? Create a publisher Com object then
subscribe to it.
See Wrox book Professional Windows DNA, Chapter 10.
Rich Cole
Signal Corporation
-----Original Message-----
From: Roland Boorman [mailto:r_boorman@y...]
Sent: Wednesday, April 04, 2001 5:08 PM
To: sql language
Subject: [sql_language] Re: Detecting the last change datetime for a
table
This is a very interesting subject area
Of course what starts of as an innocent question is actually
the tip of a very big iceberg. What do we mean by changes!!
We are not looking at a simple file system here rather memory caches
temporary datasets integrity checks etc etc. All potentially hit
simultaneously by
multiple users. So the question of detecting changes is simplistic.
However the is a way of approaching this problem using components
sitting server side. Unlike your remote connection the component can
continually say every ten seconds check for changes. Now the component
acts as a middle layer between ourselves and the server.
We still have to ask the com if changes have occured (you define the
changes)
but its a version logic and therefor only likely to be a very small round
trip.
The com for instance could hold the static ADO recordsets. And flush
requery these ever say 10 seconds. Changes seen to this data set
would set a say version switch.Say start at version 1 change now version 2.
You check the version number if its the same as before no change else
refresh your static data.
You can create a small component with VB that performs this function.
Thus the component runs on the local server side user checking for our
changes (whatever these are!). We talk to this component
bsarna wrote:
Hi there,
read your thread on p2p.wrox site regarding Detecting the last change
datetime for a table, i also need help regardin same. if you have been
able to find out a way pls do send me also
thanks
sarna
> Hi all,
> In one of our applications, we keep a set of 'static' data tables in the
> SQL Server along with our 'dynamic' data. The static data gets read by
> the clients whenever the application is started, and persisted on the
> client throughout it's session to avoid trips to the server for things
> like selection lists of values, etc. I've been working on some code to
> maintain the static stuff on the client's hard-drive in a persisted ADO
> recordset. I can check the timestamp of the file on the user's hard-
drive
> and only download a new copy if the table on the server has changed. I'd
> like to know if it's possible to get the date-time that the contents of a
> table were last changed using TRANSACT-SQL. I've found how to get the
> date-time that the table was created, but not when the contents were last
> modified. I realise that this could be done by maintaining the date-time
> of the last update elsewhere in the database, and setting this using a
> trigger on the static data table, but I think that this would be a bit
> messy. Does anyone know if it's possible to get the date-time of a
> table's last update, and if so how? Alternatively can anyone think of a
> better way of doing this that's not going to result in massive amounts of
> recoding?
>
> My thanks in advance for any help.
>
> Mark.