Schultz’s PowerBuilder Notes

Datawindow Retreive With Large In Clause


Our DBMS limits the number of Items in an “IN Clause” to 255. If you attempt to retrieve with an array of a larger size, the retrieve fails. One method of dealing with this constraint is to create a temp table, populate this with your retrieval arguments, and then have your datastore join to the temp table during the retrieve. Another way is to use a function similar to this: Continue reading

August 10, 2009 Posted by | 2. Datawindows, Uncategorized | , , , , , , | 1 Comment

Getting a Reference to a Submenu


Getting a reference to the window’s menu is easily accomplished using the window’s MenuId property.  But what if you want to get a reference to a submenu and all you have is a string with the menu’s name?  This following function will do the trick: Continue reading

August 1, 2009 Posted by | 1. PowerBuilder General, Menus, Powerscript | , , | 1 Comment

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(). Continue reading

May 13, 2009 Posted by | 3. PFC, Utility Services | , , , , , | 1 Comment

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.

Continue reading

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

Sybase and Nulls


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

Continue reading

January 7, 2009 Posted by | 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.

Continue reading

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

Datawindow Column Properties


The Dialog box

Continue reading

December 10, 2008 Posted by | 2. Datawindows, Datawindow Painter, Expressions, Modify and Describe | , , , , , , , , | Leave a comment

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.

Continue reading

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

Data Model


This is the data model and data for examples.

Continue reading

November 16, 2008 Posted by | Drop Down Data Window (DDDW) | Leave a comment

Follow

Get every new post delivered to your Inbox.