Guaranteeing a Singleton
Because the datetime on the client machine may not be accurate, I wanted to write a function to get the current date and time from the server.
For Sybase DBMS, this is simply achieved with the GetDate() function. The problem is developing the SQL to return exactly one row everytime the function is called. (It will still work if the SQL returns multiple rows, but you will have a lot of unecessary database traffic.)
-
Archives
- August 2009 (2)
- May 2009 (1)
- March 2009 (1)
- January 2009 (2)
- December 2008 (1)
- November 2008 (2)
- September 2008 (1)
- August 2008 (1)
- July 2008 (24)
- June 2008 (22)
- May 2008 (69)
- April 2008 (25)
-
Categories
-
RSS
Entries RSS
Comments RSS