|
Home > Archive > MS SQL Server > December 2005 > TimeStamp
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Sawlmgsj 2005-12-30, 3:23 am |
| A question for Delphi experts (dare I ask it in here?)
Do you know how to collect the value in a TimeStamp field?
My intention is to use this value to check whether another user has updated
the field whilst I have been reviewing it - and then I go to make my update.
My TimeStamp field is called Stamp.
I could not find a Delphi type to copy it into directly, so I tried to
convert it to a DateTime with this code:
myDateTime:=SQLTimeS
tampToDateTime(myDat
aSet. FieldByName('Stamp')
.AsSQLTimeStamp);
This returns the error: "Cannot access field Stamp as type SQLTimeStamp".
Any help would be appreciated.
Thanks,
Steve.
| |
| John Bell 2005-12-30, 7:23 am |
| Hi
Comparing the field at binary level would give you the information of
whether it has changed as this is a binary(8) value rather than a datetime.
John
"Sawlmgsj" < Sawlmgsj@discussions
.microsoft.com> wrote in message
news:7AA4FB33-6494-4BAC-9AB5- DEF330E65C0D@microso
ft.com...
>A question for Delphi experts (dare I ask it in here?)
>
> Do you know how to collect the value in a TimeStamp field?
> My intention is to use this value to check whether another user has
> updated
> the field whilst I have been reviewing it - and then I go to make my
> update.
>
> My TimeStamp field is called Stamp.
> I could not find a Delphi type to copy it into directly, so I tried to
> convert it to a DateTime with this code:
>
> myDateTime:=SQLTimeS
tampToDateTime(myDat
aSet. FieldByName('Stamp')
.AsSQLTimeStamp);
>
> This returns the error: "Cannot access field Stamp as type SQLTimeStamp".
>
> Any help would be appreciated.
>
> Thanks,
> Steve.
>
|
|
|
|
|