Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Timestamp(RowVersion) to BigInt

Status
Not open for further replies.

bustell

Programmer
Mar 22, 2002
159
US
Because of problems using Delphi 7 to retrieve and pass Timestamp data types, I am considering converting my timestamp field to a BigInt before sending a record to our Delphi application. Then allowing the Delphi application pass the BigInt back in a stored procedure where I will convert it back to a Timestamp for performing optimistic locking.

Does anyone see a problem converting a Timestamp field to a BigInt and then back to a Timestamp type? From what I am thinking there would not be any data loss doing this even when the Timestamp get very large.

Any thoughts on this would be greatly appreciated.


Pat B
 
Timestamp takes 8 bytes and is functionally the same as binary/varbinary(8), depending on NULLability. No conversion problems.

Note that timestamp column is read-only and automatically changes after every row update.

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top