You are currently browsing all posts tagged with Powerbuilder

PowerBuilder – My source control is Wacked…

Posted on November 17, 2011 at 8:50 pm in

A long time ago I was messing around with the idea of using Mercurial source control with with PowerBuilder. I had set up a Mercurial tool called HGSSC which allowed interaction via the MSSCCI API. I then fired up PB and brought up the workspace properties and yes, the Mercurial client was a choice. So…

PowerBuilder – My source control is Wacked… - the full story »

PowerBuilder Assertion Failure

Posted on October 26, 2011 at 8:04 pm in

Here is a minor head scratcher in PB11.5. IF Len(dw_1.object.column_name[1]) > 50 THEN // and so on This gives you a nifty messagebox: To fix this do something like: IF Len(string(dw_1.object.column_name[1])) > 50 THEN… or string ls ls = dw_1.object.column_name[1] IF Len(ls) > 50 THEN… Since there are two Len methods (one for blob and…

PowerBuilder Assertion Failure - the full story »

PowerBuilder – Where is the PB.INI file?

Posted on October 13, 2011 at 3:00 pm in

So I’m looking for the Custom Color settings that I have set up in PB (11.5.1) and think PB.INI? Registry settings? magic? The first two places don’t give me the information so “Google to the Rescue”. Paul Horan had a blog entry (old Sybase site since dead) on this and says it’s kept in the…

PowerBuilder – Where is the PB.INI file? - the full story »

PowerBuilder ‘Gotcha’ – Selectionchanging event on Tab controls

Posted on September 27, 2011 at 8:19 pm in

Selectionchanging is an event on a tab control which is triggered, according to PowerBuilder help, ‘when another tab is about to be selected.’ From this description you might think that this means changing from one tab to another; this is only partially correct. This event is triggered also when the window opens. Depending upon your…

PowerBuilder ‘Gotcha’ – Selectionchanging event on Tab controls - the full story »

Calculate the Last Day of the Month

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

Here is how to calculate the last day of the current month. Powerbuilder date ld_eom ld_eom = RelativeDate(Date(String(Month(Today()) + 1) + "/1/" + String(Year(Today()))), -1) SQL Server SELECT DATEADD(DAY, -1, DATEADD(MONTH, DATEDIFF(MONTH, 0, Getdate()) +1, 0)) I quess SQL Denali has a new function (EOMONTH) to do this too. SELECT EOMONTH(GETDATE())

Calculate the Last Day of the Month - the full story »

Joining to a Table Function in SQL Server

Posted on September 9, 2011 at 8:20 pm in

Following up on my previous post, SQL Server (since version 2005 while in SQL 90 compatibility mode) provides the ability to join to the table created by a parameterized table function. In earlier versions you were not able to use a table function with a dynamic parameter or even join to it. If you needed…

Joining to a Table Function in SQL Server - the full story »

Splitting up a String or Text in SQL

Posted on September 9, 2011 at 8:15 pm in

Here is a way to split up a block of text and return a result set based on a delimeter. A table function is used to do the ‘heavy lifting’ and, utilizing some newer features of SQL Server (2005 and 2008), you can even join to it providing for even greater flexability. This situation I…

Splitting up a String or Text in SQL - the full story »

PowerBuilder ‘Gotcha’ – PixelsToUnits

Posted on September 7, 2011 at 8:20 pm in

From the Powerbuilder Help on this method: Converts pixels to PowerBuilder units. Because pixels are not usually square, you also specify whether you are converting the pixels’ horizontal or vertical measurement. Syntax PixelsToUnits ( pixels, type ) Argument Description pixels An integer whose value is the number of pixels you want to convert to PowerBuilder…

PowerBuilder ‘Gotcha’ – PixelsToUnits - the full story »

PowerBuilder – Reading Outlook Items

Posted on September 1, 2011 at 8:20 pm in

Here is some code which reads data from Outlook (2007 was tested) into PowerBuilder. You basically need to create a window with a multiline edit and a button on it. Put this into the clicked event of the button. To run it, open Outlook, select something (email message, task, etc.) then click the button on…

PowerBuilder – Reading Outlook Items - the full story »

PowerBuilder – Grid datawindow object with variable number of columns

Posted on August 17, 2011 at 8:20 pm in

Here is a way to build a grid datawindow which contains columns corresponding to an unknown number of data elements. You could use this approach in creating a project schedule, inventory location system, baseball box score, or any number of other examples. My example assumes the minimum number of columns to be four. This create…

PowerBuilder – Grid datawindow object with variable number of columns - the full story »

Top