You are currently browsing the post archives for September 2010.

Powerbuilder – PFC Resize Service Extension / Max Height & Width

Posted on September 29, 2010 at 8:25 pm in

The PFC window resize service is one of my favorite things in the entire class library as it can easily be implemented and adds a great bit of functionality to an application. One drawback, however, is there is no built in capability to limit the resizing of the objects on a window; either they resize…

Powerbuilder – PFC Resize Service Extension / Max Height & Width - the full story »

Comment on Powerbuilder – PFC Resize Service Extension / Max Height & Width »

PowerBuilder – PFC file, resize, and string services

Posted on September 28, 2010 at 8:20 pm in

Although the PFC provide a wide range of capabilities, it can be a very tedious task to ‘strip out’ a specific piece of functionality for use in an ‘non PFC’ application. Here are the objects and modifications you need to do to strip out the File Service, Window Resize Service, and the String Service. PFC.PBL…

PowerBuilder – PFC file, resize, and string services - the full story »

PowerBuilder – Getting Active Directory information

Posted on September 27, 2010 at 8:00 pm in

Here is a handy bit of OLE to retrieve Active Directory information. oleobject ads string ls_stuff ads = CREATE OleObject ads.ConnectToNewObject( "ADSystemInfo" ) ls_stuff = 'User: ' + String(ads.UserName) ls_stuff += '~n~r' + 'Computer: ' + string(ads.ComputerName) ls_stuff += '~n~r' + 'Domain: ' + string(ads.DomainDNSName) ls_stuff += '~n~r' + 'Domain short: ' + string(ads.DomainShortName) ls_stuff…

PowerBuilder – Getting Active Directory information - the full story »

SQL Server Date & Datepart formats

Posted on September 24, 2010 at 8:24 pm in

Here is a handy cheat sheet for dates in SQL Server: — DATEPART SAMPLES select 'Year: ' + CONVERT(NVARCHAR(4),datepart(year, GETDATE())) select 'Quarter: ' + CONVERT(CHAR(1),datepart(quarter , GETDATE())) select 'Month: ' + CONVERT(NVARCHAR(2),datepart(month, GETDATE())) select 'Day of Year: ' + CONVERT(NVARCHAR(3),datepart(dayofyear, GETDATE())) select 'Day of Month: ' + CONVERT(NVARCHAR(2),datepart(day, GETDATE())) select 'Week: ' + CONVERT(NVARCHAR(2),datepart(week, GETDATE()))…

SQL Server Date & Datepart formats - the full story »

PowerBuilder ‘Gotcha’ – Quoted Identifiers

Posted on September 21, 2010 at 8:20 pm in

Be careful when developing against any database which supports quoted identifiers (I know, who doesn’t)? Anyway it is real easy to forget and ‘turn off’ this option on your local db (or your development connection) and end up releasing a bug by a simple SQL alteration like this: –Original SQL SELECT partNo , partDesc FROM…

PowerBuilder ‘Gotcha’ – Quoted Identifiers - the full story »

PowerBuilder – Special Effects Popup

Posted on September 20, 2010 at 8:40 pm in

A question came up on Tek-tips forum regarding creating a special effects popup window. These are the kind which come up from the bottom right corner of your display to tell you your virus data has been updated or some such important message. Many times these are also semi transparent and even go away after…

PowerBuilder – Special Effects Popup - the full story »

PowerBuilder ‘Gotcha’ – Datawindow update properties

Posted on September 17, 2010 at 8:20 pm in

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 ‘Gotcha’ – Datawindow update properties - the full story »

PowerBuilder – Datawindow SQL changes made easy

Posted on September 16, 2010 at 8:20 pm in

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 – Datawindow SQL changes made easy - the full story »

PowerBuilder ‘Gotcha’ – pfc Resize service and Tabpages

Posted on September 8, 2010 at 8:20 pm in

The window resize service is one of the best features of the PFC. With a few lines of code you can easily make your application much more resolution independent and user friendly. Something else which makes this service pretty cool is that it can be easily un-copoled from the rest of the pfc. All you…

PowerBuilder ‘Gotcha’ – pfc Resize service and Tabpages - the full story »

PowerBuilder – Things to Avoid

Posted on September 2, 2010 at 8:16 pm in

“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 – Things to Avoid - the full story »

Top