Sybase and Nulls
If you have not read about how PowerBuilder treats nulls, you may want to read nulls first.
Setting the RowStatus
If you have worked with PowerBuilder for a while, you have learned that setting the status of a row is not always a straight forward procedure. I have created a handy utility which will simplify this process.
Continue reading
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.)
Nulls
I find nulls to be the cause of so many bugs. Here are a few things that have helped me get my mind around this surprisingly confusing topic.
Let’s look at the following script, what would the result be?
Changing an Object’s Ancestor
I was once in a code review and I noted that the custom object that was built should be inherited from n_base so it can inherit the constants SUCCESS, FAILURE and NO_ACTION.
Negative Logic
I maintain several PowerBuilder applications which were written a long time ago by developers just starting out in PB. So I see a lot of odd code.
Here is an example of a script which has negative logic
System Functions
Evaluate( )
The evaluate( ) function is available for use with Describe( ). Evaluate( ) lets you evaluate DataWindow expressions within a script using data in the DataWindow. It has the following syntax:
Dynamically Changing DataWindow Properties
What is the difference between SELECT and PBSELECT
PBSELECT is generic database independent SQL which is stored in the DataWindow. The actual outer join SQL for native Sybase connection will differ from an ODBC Sybase connection.
-
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