Re: Store SQL Timestamp locally for comparison

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"DBG" <DBG@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4E691A2C-163F-40E5-86BA-1BE5DA3DF387@xxxxxxxxxxxxxxxx
You do realise that timestamp fields are not really about storing dates
or
times, but storing a rowversion for the record?
Yes, I don't care about the actual data of the timestamp.

If you have a field of type Timestamp in SQL Server, which type is used
to
hold this in the local table in the mdb file?

I don't want to hold it in a table, I want to hold in a variable form.
Array, variant, whatever. I just don't know the assoicated type to store
it
as.

In other words I don't care what is contained in the timestamp field, I
just
need to know whether or not it is the same - ie has the row been updated
on
the server since the time I downloaded my local copy.

Right, I appreciate that I could use a bit of code like that, but all I
care
about is the MAX value of the timestamp fields. Ie, the value when any
row
in the table was last updated. In this way I can check my local value vs.
the value on the server, to see if anyone has made any changes to any
records
without checking them all.

Thanks for the input so far!

-David


OK I understand what you wish to do, but I would still recommend downloading
the timestamp field into your local Access database. This does not mean
that you have to check every row for changes, you could write a function to
efficiently find out if at least one row in the table has changed.
Assuming you are also using another field as a primary key, this makes a
very powerful combination, because you can now find not only if a table has
been changed, but how many rows and also list all the rows which exist in
one dataset but not in the other (ie records which have been added or
deleted).


.



Relevant Pages

  • Re: SQL Losing Data
    ... that took care of the issue with the "record has been changed" error ... I'm sure having the timestamp field will take care of that other ... This issue is more likely due to using ODBC or some ... > data types. ...
    (microsoft.public.sqlserver.odbc)
  • Re: Convert input to Unix Timestamp
    ... eclipsme wrote: ... if you only care about year-month-day, ... want to store the data as a timestamp? ... -Friends don't let friends drive Windows ...
    (alt.php)
  • Help !! Im stuck in time !! :)
    ... Nope, I'm not a time traveller, but I do have something related to time ... functions I can't get my head 'round. ... I have to convert a timestamp to a humanly readable date/time. ... if you care to help, ...
    (microsoft.public.excel)