Schultz’s PowerBuilder Notes

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.)

Continue reading

September 19, 2008 Posted by | Database, Powerscript | , , , , | Leave a comment