You are currently browsing all posts tagged with Powerbuilder

PowerBuilder ‘Gotcha’ – Datawindow retrieval arguments

Posted on July 16, 2010 at 8:22 pm in

So I’m working on a scheduling process and I have a datawindow object which takes a number of arguments.I have them set up as al_pro_id (long), adt_end (datetime), adt_start (datetime), al_resource_id[] (long array), and al_dept_id (long). To save from maintaining two separate objects, I used this object for a datawindow as well as for datastores…

PowerBuilder ‘Gotcha’ – Datawindow retrieval arguments - the full story »

PowerBuilder ‘Gotcha’ – Datawindow.Create function

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

I’m working in a custom report application and a tester who is auditing the changes is getting an syntax error when she tries to run her report. The report generator takes the list of columns chosen by the user and builds a SQL statement which is then fed through the SyntaxFromSQL function to generate the…

PowerBuilder ‘Gotcha’ – Datawindow.Create function - the full story »

PowerBuilder – ‘Plug in’ Applications

Posted on July 9, 2010 at 8:38 pm in

I helped develop a special order processing application which was both a stand alone application as well as a ‘plug in’ into a couple of existing apps. By ‘plug in’ I mean the same windows and functionality was brought into the existing applications without any significant changes. Part of the trick in doing this is…

PowerBuilder – ‘Plug in’ Applications - the full story »

PowerBuilder – Method to add minutes to a Datetime

Posted on July 7, 2010 at 8:20 pm in

This is a method to add any number of minutes to a datetime to obtain a second datetime. Although not as ‘elegant’ as the SQL Server cursor methods, it does avoid any database calls. global type f_add_time_to_datetime from function_object end type forward prototypes global function datetime f_add_time_to_datetime (datetime adtm_start, long al_minutes) end prototypes global function…

PowerBuilder – Method to add minutes to a Datetime - the full story »

PowerBuilder – Single user sign on verification for SQL Anywhere

Posted on July 7, 2010 at 8:17 pm in

This method is used with a SQL Anywhere database to ensure that any given user can only sign on the application once. It uses the connection_property function so make sure you either give the users permission to execute this or set up a separate connection which uses an id which has the permissions. There are…

PowerBuilder – Single user sign on verification for SQL Anywhere - the full story »

PowerBuilder & MS SQLServer datetime methods

Posted on July 6, 2010 at 8:37 pm in

If you have scheduling functionality in your application sooner or later you are faced with spanning dates. By this I mean starting something on one day and ending it on another. Powerbuilder is not very good at this, especially if you have something which starts before midnight and ends after midnight. SQL Server provides good…

PowerBuilder & MS SQLServer datetime methods - the full story »

PowerBuilder ‘Gotcha’ – dddw Edit Type

Posted on July 2, 2010 at 8:20 pm in

Be careful when you change the columns in a datawindow object referenced in another datawindow object when using the DropDownDatawindow Edit Type.  If you change the column name which is referenced in the DDDW Edit Type of another you won’t get a compile error when saving – but you will get runtime errors.  This happened…

PowerBuilder ‘Gotcha’ – dddw Edit Type - the full story »

Comment on PowerBuilder ‘Gotcha’ – dddw Edit Type »

PowerBuilder – Simple datawindow column sort by click

Posted on July 1, 2010 at 8:20 pm in

This sample is for sorting the rows in a grid datawindow ascending or descending based on the user clicking the column header. It only allows for a single column sort at a time. //Clicked event of datawindow // You need an instance variable (string is_sort_column) // This script first checks to see if we've clicked…

PowerBuilder – Simple datawindow column sort by click - the full story »

PowerBuilder ‘Gotcha’ – Datawindow XML

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

A feature was added to the datawindow as of version 9 which allows you to save the data as XML (you have to define an export template). The syntax is: ls_xml_data_set = dw_1.object.datawindow.data.xml However, if you have a large string column in the datawindow  – something like a CHAR(32000) – and it contains a lot…

PowerBuilder ‘Gotcha’ – Datawindow XML - the full story »

PowerBuilder ‘Gotcha’ – Autosize Height and strings (wordwrap doesn’t work)

Posted on June 25, 2010 at 8:20 pm in

So I have a datawindow which displays some information in rows about invoices for a customer. There is a ‘notes’ column which contains whatever the salesperson entered at the time of the order. Generally you would want to make sure the column in the datawindow for these notes is flagged with the autosize height property…

PowerBuilder ‘Gotcha’ – Autosize Height and strings (wordwrap doesn’t work) - the full story »

Top