Board index » delphi » Timestamp field in MSSQL

Timestamp field in MSSQL

Hi,

what is the best way to read data out of a timestamp field in MSSQL.

The just show up as [bytes] in a grid.

I'm using MSDE2000, Delphi5Ent and ADO.

Thanks for your help,

Mike

 

Re:Timestamp field in MSSQL


Quote
"Michael W" <mikey_from...@yahoo.co.uk> wrote in message

news:3d3eb167_2@dnews...

Quote
> It turns out that the book I'm using, which describes the Timestamp
datatype
> like this:

> "Timestamp stores data representing the current date and time ...."

> is talking cobblers.  What I want to know is who gave it that name? Cut
his
> nuts off with
> blunt toe-nail clippers, thats what I say. As for the author of the book

I think the problem is that SQL Server uses the term TimeStamp for one
thing - an autoincrementing binary number that increases everytime a row is
modified, and most other DBMSs uses the term TimeStamp to mean date & time
values (which SQL Server calls DateTime).

Andy Mackie.

Re:Timestamp field in MSSQL


Quote
"Michael W" <mikey_from...@yahoo.co.uk> wrote in message

news:3d3d620f$1_2@dnews...

Quote
> Hi,

> what is the best way to read data out of a timestamp field in MSSQL.

> The just show up as [bytes] in a grid.

> I'm using MSDE2000, Delphi5Ent and ADO.

It turns out that the book I'm using, which describes the Timestamp datatype
like this:

"Timestamp stores data representing the current date and time ...."

is talking cobblers.  What I want to know is who gave it that name? Cut his
nuts off with
blunt toe-nail clippers, thats what I say. As for the author of the book
....

Ho hum - time to get a new book.

Mike

Re:Timestamp field in MSSQL


Quote
"Andy Mackie" <amac...@citynetworks.co.uk> wrote in message

news:3d3eb2ea_1@dnews...
Quote
> I think the problem is that SQL Server uses the term TimeStamp for one
> thing - an autoincrementing binary number that increases everytime a row
is
> modified, and most other DBMSs uses the term TimeStamp to mean date & time
> values (which SQL Server calls DateTime).

Andy,

so why call it a timestamp, then?   Must have been someone in the "Lets
redefine words in the dictionary, at random, just for fun" department at
Microsoft.

Hope moonshine spruce enigma*

Mike

* This means "have a nice day", but I randomly redifined the words just for
fun :-)

Re:Timestamp field in MSSQL


Timestamp field is row-changed flag. Instead of including all field values
in where clause, you include just this one to test for row changed.
Why timestamp?
mssql uses transact SQL which is quite older than SQL standard.

--
Robert

Quote
Michael W wrote in message <3d3eb5ee$1_1@dnews>...

>so why call it a timestamp, then?   Must have been someone in the "Lets
>redefine words in the dictionary, at random, just for fun" department at
>Microsoft.

Re:Timestamp field in MSSQL


"Michael W" wrote >

Quote
> so why call it a timestamp, then?   Must have been someone in the "Lets
> redefine words in the dictionary, at random, just for fun" department at
> Microsoft.

Lets not be too harsh on Microsoft on this one (just for a change!), as
TimeStamp is down to Sybase, IIRC. Once upon a time Microsoft SQL Server was
Sybase SQL Server. They have gone their separate ways since then, but much
of the Sybase terminology lingers on.

Andy Mackie.

Re:Timestamp field in MSSQL


Quote
"Andy Mackie" <amac...@citynetworks.co.uk> wrote in message

news:3d410300$1_1@dnews...

Quote
> "Michael W" wrote >
> > so why call it a timestamp, then?   Must have been someone in the "Lets
> > redefine words in the dictionary, at random, just for fun" department at
> > Microsoft.

> Lets not be too harsh on Microsoft on this one (just for a change!), as
> TimeStamp is down to Sybase, IIRC. Once upon a time Microsoft SQL Server
was
> Sybase SQL Server. They have gone their separate ways since then, but much
> of the Sybase terminology lingers on.

Ok Andy, point taken, but is is still bogus.

Cheers,

Mike

Re:Timestamp field in MSSQL


Quote
"Robert Cerny" <robert.qwe.ce...@neosys.xrs.qwe.si> wrote in message

news:ahpamb.23k.1@neosys.xrs.si...
Quote
> Timestamp field is row-changed flag. Instead of including all field values
> in where clause, you include just this one to test for row changed.
> Why timestamp?
> mssql uses transact SQL which is quite older than SQL standard.

Robert,

this doesn't answer why it was called a timestamp, just that the word was
available for use.
It is mis-named however long ago they started using it.

Regards,

Mike

Re:Timestamp field in MSSQL


Quote
Michael W wrote in message <3d41195c_2@dnews>...

>this doesn't answer why it was called a timestamp, just that the word was
>available for use.
>It is mis-named however long ago they started using it.

That's your wrong opinion.
Timestamp is unique stamp in time. It can be current time, but it might not
have enough high resolution for certain purposes, so some reasonably chose
an arbitrary value.
Use datetime instead.
And if you still don't like it, complain to MS and Sybase.
--
Robert

Re:Timestamp field in MSSQL


Quote
"Robert Cerny" <robert.qwe.ce...@neosys.xrs.qwe.si> wrote in message

news:ahrg8p.29s.1@neosys.xrs.si...

Quote
> Michael W wrote in message <3d41195c_2@dnews>...

> >this doesn't answer why it was called a timestamp, just that the word was
> >available for use.
> >It is mis-named however long ago they started using it.

> That's your wrong opinion.
> Timestamp is unique stamp in time.

WRONG - it is not related to time AT ALL.  It is a unique number for the
database, but would be
the same if the row was created or modified NOW or 1 hour from now. There
for it is a misnomer.

So, your opinion is the wrong one.

It can be current time, but it might not

Quote
> have enough high resolution for certain purposes, so some reasonably chose
> an arbitrary value.
> Use datetime instead.
> And if you still don't like it, complain to MS and Sybase.
> --
> Robert

Other Threads