Richard (Rik) Brooks

Subscribe to Richard (Rik) Brooks: eMailAlertsEmail Alerts
Get Richard (Rik) Brooks via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Top Stories by Richard (Rik) Brooks

Every programmer knows about the IF command. It's pretty much a fundamental part of the syntax of every computer language that has ever existed. I don't need to explain how it works. The DataWindow can't use the IF command though. It does, however, support an IF function. IF(expression, TRUE, FALSE) In its simplest form this means that if the expression evaluates to TRUE, then whatever statement you supply for the TRUE part is executed. If not then the FALSE part is. Let's begin with a simple example. Let's create a DataWindow that will show employee information. Here is the SQL for it: SELECT employee_a.emp_id,   employee_a.manager_id,   employee_b.emp_fname manager_first_name,   employee_b.emp_lname manager_last_name,   employee_a.emp_fname employee_first_name,   employee_a.emp_lname employee_last_name,   department.dept_name, employee_a.status,   employee_a.salary  ... (more)

Professional DataWindow Sorting

In my last article we explored what I call Advanced DataWindow Sorting. We covered everything that we need for the DataWindow. In this article we are going to polish what we did last month and make it look professional. The main area of concern is our sort selector window as seen in Figure 1. It does the job. It's just amateurish and doesn't provide the full flexibility that we really need. You may recall that the text of the sortable column is specified in the tag property of the column in the DataWindow. (huh?) We open the sort selector window with a parameter, something like t... (more)

Automating Formats and Edit Styles

I'm considering changing my emphasis in my column. Since speaking with some people at Sybase I am convinced that PowerBuilder is poised for a mighty comeback. The fact is that still today PowerBuilder is by far the most productive development tool available. It eclipses all the rest. An experienced PowerBuilder programmer is demonstrably more productive and can finish tasks faster than C# or even VB.NET. So why is .NET used by more companies? Mine would just be a guess and in fact, the answer is irrelevant. I'm here to tell you that Sybase is making an obvious push to regain some... (more)

Dancing Checkboxes

Normally I write columns about the DataWindow or Appeon. This month though I ran into an interesting little logic problem and when I solved it I realized it was really a nice piece of code so, even though it is not in my normal genre I thought I'd share it. I was tasked with allowing the user to pick a combination of days of the week with these specifications. The user may select no more than three days prior to today. The user may select no more than three days in the future. The user may not have both prior and future dates in the same group If there are not three days in the ... (more)

DataWindow Magic: Menu Security

Security is a must for most corporate applications. This article will give you a starting point to designing and implementing your own. We will do it with a table that is added to the example database and implement it in ancestor code. The idea is that you should only have to add rows to a table to implement your security. The Table The security table will provide a means to turn on and off controls and menu items as our inherited objects are constructed. Security Login_name varchar(20) PK Application varchar(20) PK Item_type varchar(10) PK Item_name varchar(20) PK Priviledge ... (more)