You are currently browsing the post archives for January 2011.

Update Columns in Database

Posted on January 28, 2011 at 8:20 pm in

It’s pretty common to want to update a column (or several columns) in one table with the value(s) from another table. Here is how to do it: UPDATE Table SET Table.col1 = other_table.col1, Table.col2 = other_table.col2 FROM Table INNER JOIN other_table ON Table.id = other_table.id WHERE … The structure of this syntax is always something…

Update Columns in Database - the full story »

PowerBuilder – Adding a Structure to an NVO

Posted on January 21, 2011 at 8:20 pm in

It is possible to define a structure within an non-visual object. You can view/ or edit the source of the nvo and insert the structure definition directly: global type nvo_case from nonvisualobject end type type str_test from structure within nvo_case end type end forward type str_test from structure string as_parm1 string as_parm2 end type global…

PowerBuilder – Adding a Structure to an NVO - the full story »

PowerBuilder – Add /Remove a Font at Runtime

Posted on January 12, 2011 at 8:20 pm in

Here is a way to add (and remove) a font to the user’s machine at runtime. You can also use this to check if a user has a particular font installed since the code also shows how to list all the installed fonts (need MS Word for this). Way back in my PB5 days I…

PowerBuilder – Add /Remove a Font at Runtime - the full story »

PowerBuilder ‘Gotcha’ – Window Hangs when Opened

Posted on January 12, 2011 at 8:20 pm in

So your working on some prototype for a proof of concept and are banging away at your code. Cut paste, snip, add error checking for just one case, add another control, etc., etc., and etc. You run the application, your window loads, and then things hang. You check the code, you check the database, you…

PowerBuilder ‘Gotcha’ – Window Hangs when Opened - the full story »

PowerBuilder – Next Key Service

Posted on January 11, 2011 at 8:20 pm in

As an extension of the next key stored procedure article, here is a pretty easy to implement a next surrogate key service to use with the PFC. If you don’t use the PFC it is still fairly easy to use with some modification. You can use this service anytime you want to get a sequential…

PowerBuilder – Next Key Service - the full story »

PowerBuilder – Move Frequently Chosen Items to Top of DropDownDataWindow

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

I’m looking at an application which basically records demographic information for a population. One of the fields listed is ‘primary language’ which has a typical dropdowndatawindow interface. I look at the options and BAM!, a huge alphabetical list (including Esperanto!). Now this application is generally used in the US so my guess is at least…

PowerBuilder – Move Frequently Chosen Items to Top of DropDownDataWindow - the full story »

Top