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…
You are currently browsing the post archives for August 2010.
PowerBuilder – Capture Images from Webcam
PowerBuilder – Color settings
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 ‘Gotcha’ – Null Messagebox
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’ – Datawindow datasource values
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…
Look what I found – part 2
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.…
PowerBuilder – Ethiopian multiplication
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 – Database transactions using PFC n_tr
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 – Data Load/ETL process
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 Bug – Autosize height and font color
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 ‘Gotcha’ – SQL Errors
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…