Many applications I’ve worked on have grid datawindows that include columns which display graphics to indicate some sort of common functionality such as code inquiry, row selection indicator, etc. Generally you set the ‘display as bitmap’ property on the column and go from there. The problem with these columns, however, is if the user resizes…
You are currently browsing all posts tagged with datawindow
PowerBuilder – Prevent Individual Column Resizing in Grid DW
PowerBuilder – Formatting and Validating Date/Time entries in a Datawindow
Using an editmask on a datawindow column to format a user’s input is pretty common practice for most applications. Done right it leads to a better user experience (no extra formatting characters to type) and can be visually appealing (all phone numbers formatted the same way for example). One really annoying behavior of an editmask…
PowerBuilder – Datawindow Filter on a datetime column
A question came in on the TekTips Powerbuilder forum regarding filtering on a datetime column in a datawindow. Basically the problem was a ‘type mismatch’ error when trying to filter this type of column. This is how the author was setting the filter: <code> ls_filter = "ls_column_name= '11/10/2010 12:30:00'" or ls_filter = "ls_column_name= '" +…
PowerBuilder – Changing Datawindow object source to stored procedure
So I had to update a report which deals with item prices in an application. Very familiar territory here. However, this report had a very large SQL statment consisting of five unions with many sub selects, case statements, and etc. The kind of code which, at first glance, looks like its held together with chewing…
PowerBuilder – Number of Characters Remaining in a String Column
A system I developed a while back was essentially a front end for a COBOL zSeries application (System 390 for you old timers). As such I had to make sure my data played nice with the VSAM files and the functionality my app was essentaily replacing. In one instance the users had the ability to…
PowerBuilder – Item counter for datawindow entries
This is a PFC based component I build for an application used to create purchasing requisitions. The main datawindow was used to enter new ‘documents’ and was too large to allow for more than one row to be visible at a time. Rather than use a common ‘vcr’ type control I created one which shows…
PowerBuilder ‘Gotcha’ – Datawindow update properties
So a customer is complaining that their data is ‘auto-magically’ changing and there is ‘no way anyone here is doing it since I’m the only one who knows how’. Blah, blah, blah. Solution? – database trigger to log when something is changed on the specified table. Now you go to the datawindow object which handles…
PowerBuilder – Datawindow SQL changes made easy
One application I developed involved retrieving from a large dataset based on any number of criteria. Yea, I know, this sounds just like the application you worked on right? Anyway, there are a variety of ways to achieve this in PB but the one approach I like best when dealing with a variable number of…
PowerBuilder – Things to Avoid
“Give someone enough rope and he’ll hang himself” There are a number of things to avoid in Powerbuilder since they are either resource hogs or make maintenance/debugging a real pain. In no particular order. Code in the Other event I worked for awhile on a large accounting application, a commercially available product, written in PB…
PowerBuilder ‘Gotcha’ – Datawindow datasource values
Let’s say you get a request to add some ‘audit’ capability to your application. By audit I mean there is a need to track changes made to various data elements on a record when they are saved back to the database. This can be done any number of ways but you want to make use…