You are currently browsing all posts tagged with programming

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 »

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 – 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 – 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 »

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 ‘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 »

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 »

Top