You are currently browsing the post archives for August 2010.

PowerBuilder – Capture Images from Webcam

Posted on August 31, 2010 at 8:20 pm in

Here’s some code to capture an image from a webcam in Powerbuilder using EZTWAIN. It worked fine on my Vista Home Premium laptop. I came across it earlier in 2010 but the blog page seems to be gone now. If you know the author, let me know so I can give credit. The file and…

PowerBuilder – Capture Images from Webcam - the full story »

PowerBuilder – Color settings

Posted on August 31, 2010 at 8:20 pm in

There are still many Powerbuilder web sites with this information but it is an invaluable resource unless you are the kind of person who can memorize these things. This is a color conversion chart that gives the RGB values for the standard 16 colors and some of the system colors. Color Red Green Blue Long…

PowerBuilder – Color settings - the full story »

PowerBuilder ‘Gotcha’ – Null Messagebox

Posted on August 30, 2010 at 8:20 pm in

As with many methods in Powerbuilder, the ‘Messagebox’ function returns a NULL if any of the paramenters you send it are NULL. This can be problematic in your ‘defensive programming’ situations where you are informing the user of some type of error or condition. For Example: ls_value = TRIM(data) IF Len(ls_value) > 0 THEN SELECT…

PowerBuilder ‘Gotcha’ – Null Messagebox - the full story »

PowerBuilder ‘Gotcha’ – Datawindow datasource values

Posted on August 30, 2010 at 8:20 pm in

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…

PowerBuilder ‘Gotcha’ – Datawindow datasource values - the full story »

Look what I found – part 2

Posted on August 23, 2010 at 8:30 pm in

Here is an interesting comment in the header section of a method: // Invoke Service // verb (used with object), -voked, -voking. // 1. to call for with earnest desire; make supplication or pray for: to invoke God’s mercy. // 2. to call on (a deity, Muse, etc.), as in prayer or supplication. // 3.…

Look what I found – part 2 - the full story »

PowerBuilder – Ethiopian multiplication

Posted on August 20, 2010 at 8:01 pm in

I stumbled across this task on the Rosetta Code website. (Link here) Of course I decided to do the task and, as a result, added Powerbuilder to the Rosetta Code website list of languages. There are plenty of other tasks to do so get crackin’. The process of this method of multiplication is to write…

PowerBuilder – Ethiopian multiplication - the full story »

PowerBuilder – Database transactions using PFC n_tr

Posted on August 19, 2010 at 8:19 pm in

Here is a relatively painless way to handle transaction processing in your Powerbuilder application. This code assumes the use of the PFC but could be adapted without too much trouble. This will work with the following database connections: ADO.NET ASE, SYC and SYJ Sybase Adaptive Server Enterprise DIR Sybase DirectConnect I10 Informix IN9 Informix JDB…

PowerBuilder – Database transactions using PFC n_tr - the full story »

PowerBuilder – Data Load/ETL process

Posted on August 18, 2010 at 8:20 pm in

One common piece of functionality in many business applications is the ability to import data from an external source. This could be anything from invoices and orders to inventory forecasts and patient medical histories. Quite often if this type of process is not considered in a generic context you end up with a solution which…

PowerBuilder – Data Load/ETL process - the full story »

PowerBuilder Bug – Autosize height and font color

Posted on August 13, 2010 at 8:20 pm in

This bug occurs in version 11.5.1 Build 4608. I’m not sure of other versions at this point. One of the many great features of the datawindow is the ability to create expressions on various object properties. This can greatly reduce coding for ‘eye candy’ type stuff throughout an application. A very common use is to…

PowerBuilder Bug – Autosize height and font color - the full story »

PowerBuilder ‘Gotcha’ – SQL Errors

Posted on August 10, 2010 at 8:20 pm in

Most applications I’ve worked on make at least a limited attempt to inform the user of any database related errors especially after an insert, update, and (usually) a commit. Along with this is normally code which displays the database error from the transaction object in a messagebox. Unless you use a custom messagebox with a…

PowerBuilder ‘Gotcha’ – SQL Errors - the full story »

Top