PowerBuilder – Populate a dropdownlistbox from a SQL statement

Posted on March 11, 2010 at 8:20 pm in

Here is a method to populate a dropdownlistbox control with values from a sql statement.  Since it is based on a datastore you can easily apply filters, sorts, etc. prior to populating the dropdownlistbox with values.  The code assumes the first column in the SQL is going to be used to populate the dropdownlistbox .…

PowerBuilder – Populate a dropdownlistbox from a SQL statement - the full story »

PowerBuilder – ‘Smart’ Crosstab Datawindow

Posted on March 4, 2010 at 8:20 pm in

I had a question from a co-worker regarding a functionality request from a user. Basically they wanted a datawindow to display information for vendors (basic stuff like name, amt 1, amt 2, amt 3, etc.) for a specific set of amount columns. Each line represents one vendor and the various amounts (if any) with a…

PowerBuilder – ‘Smart’ Crosstab Datawindow - the full story »

Look what I found

Posted on October 9, 2009 at 12:10 pm in

Work long enough as a programmer and you will no doubt find something in the source code which is a) unintelligible b) ridiculous c) very funny. This category is devoted to these things. Found in a stored procedure: {lots of stuff went on before this point} —- Begin Actual code —- commit; –We will probably…

Look what I found - the full story »

PowerBuilder – OLE with Facsys to Fax a Document

Posted on October 2, 2009 at 8:23 pm in

Here is a old post I put on Tek-Tips.com way back in 2001. I have just implemented an OLE faxing solution in my PB7 app using Facsys. This code creates the session, addresses the fax message, then attaches a previously created MSWord document to the fax. lole_facsys = Create OLEObject li_rc = lole_facsys.ConnectToNewObject("facsys.faxsession") //Check for…

PowerBuilder – OLE with Facsys to Fax a Document - the full story »

Msg 7391 in SQL Server

Posted on September 30, 2009 at 10:42 am in

So I’m setting up a stored procedure in SQL Server 2000 to access some data on an Oracle database. The DBAs have set up the linked server in SQL Server to the Oracle source with the name ‘DTEST’. I’m going to need to use the OPENQUERY method since I need the statement to execute in…

Msg 7391 in SQL Server - the full story »

Create Word Doc and attach to Outlook Email in PowerBuilder

Posted on September 23, 2009 at 10:47 am in

Here is some sample PowerScript from back in 2004. The word document created is saved from a template doc previously created with specific bookmarks used to format the text. oleobject lole_word OLEObject lole_item, lole_attach, lole_outlook string ls_file_name lole_word = CREATE oleobject lole_outlook = Create OLEObject TRY lole_word.connecttonewobject('word.application') CATCH (runtimeerror a) Messagebox('Error','Error connecting with MS Word.…

Create Word Doc and attach to Outlook Email in PowerBuilder - the full story »

PowerBuilder – Clearing the clipboard

Posted on September 17, 2009 at 8:32 pm in

Powerbuilder’s native ‘clipboard’ method does not clear out the buffer. Here is how to do it: // external function declarations Function boolean OpenClipboard ( & ulong hWndNewOwner & ) Library "user32.dll" Function boolean EmptyClipboard ( & ) Library "user32.dll" Function boolean CloseClipboard ( & ) Library "user32.dll" // code in application PowerObject lpo_parent ULong lul_hWnd…

PowerBuilder – Clearing the clipboard - the full story »

Code Filter User Object for Powerbuilder Apps

Posted on August 21, 2009 at 12:06 pm in

When working with the end users who would be using the Purchasing System I was tasked with developing, a requirement came out very early in the process which might otherwise have caused concern; they wanted to sift their data based on any number of various codes assigned to it.  Initially there were six different code…

Code Filter User Object for Powerbuilder Apps - the full story »

Dynamic Menu Service for PFC PowerBuilder Applications

Posted on August 21, 2009 at 8:05 am in

Back in my PB 7 days I was tasked with creating a Requisition System for the Purchasing department to replace an extremely cumbersome manual process.  Essentially it was taking the data from a multi-thousand page report (which was produced daily) into a client-server application.  It was a task most business developers should relish since, if…

Dynamic Menu Service for PFC PowerBuilder Applications - the full story »

Top