Schultz’s PowerBuilder Notes

Using the PFC’s n_cst_filesrv

The PFC’s contains handy services to work with files saved on your PC or network.  I recently had a need to collect all the files contained in particular folder and any of its subfolders.  The result is this recursive function wf_GetFileNames(). Read more »

May 13, 2009 Posted by rick130 | 3. PFC, Utility Services | , , , , , | No Comments Yet

Making DW Radio Buttons and Check Boxes look disabled

An effective GUI quickly communicates to the users  how they can interact with the current window.  For most datawindow edit styles, PowerBuilder supplies its developers with the means to visually show if  it is available to accept user input.  Unfortunately, if you are working with an older version of PB,  how to show  a disabled check box or a radio button is a  puzzle.  Here is how I deal with this issue.

Read more »

March 17, 2009 Posted by rick130 | 2. Datawindows, Datawindow PowerScript, Expressions, Modify and Describe | , , , , , , , , , , , | No Comments Yet

Sybase and Nulls

If you have not read about how PowerBuilder treats nulls, you may want to read  nulls first.

Read more »

January 7, 2009 Posted by rick130 | Database | , , , , | 1 Comment

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.

Read more »

January 1, 2009 Posted by rick130 | 2. Datawindows, Datawindow PowerScript, Powerscript | , , , , , , , , , , | 4 Comments

Datawindow Column Properties

December 10, 2008 Posted by rick130 | 2. Datawindows, Datawindow Painter, Expressions, Modify and Describe | , , , , , , , , | No Comments Yet

The Ol’ Hidden Items in the Dddw Problem Part II

We all eventually need to build a datawindow where the contents of a drop down list is dependent on the value of another column.

Filtering the available selections in the dddw for the current row is straight forward, just add the necessary filtering script in the RowFocusChanged and ItemChanged events.   (See DDDW Contents Based on the Value of Another Column for more information regarding this. ) But if you have a tabular view, problems may soon become apparent with dependent columns in some rows displaying code values instead of descriptions.

Read more »

November 16, 2008 Posted by rick130 | Drop Down Data Window (DDDW) | , , , , , , , , , , , | 4 Comments

Data Model

This is the data model and data for examples.

Read more »

November 16, 2008 Posted by rick130 | Drop Down Data Window (DDDW) | | No Comments Yet

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

Read more »

September 19, 2008 Posted by rick130 | Database, Powerscript | , , , , | No Comments Yet

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?

Read more »

August 14, 2008 Posted by rick130 | Powerscript | , , , | 1 Comment