You are currently browsing all posts tagged with programming

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 – Lookup the Display value of a DDDW column

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

It’s a pretty typical situation where you want to know the value displayed in a dropdown datawindow even though behind the scenes only the ID is saved.  Here is a technique you can use to look up the value in any row in the datawindow. ls_describe = “Evaluate(‘LookUpDisplay(part_id)’, ” + string(ll_found) + “)”//ll_found is the…

PowerBuilder – Lookup the Display value of a DDDW column - the full story »

Comment on PowerBuilder – Lookup the Display value of a DDDW column »

PowerBuilder – Change Background of Modified Columns in Datawindow

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

Okay so you have a datawindow with a bunch of rows which can be edited (a grid datawindow is a good choice).  So when the user pulls up the data set and proceeds to change values in a variety of columns and a variety of rows you want to indicate to him that the specific…

PowerBuilder – Change Background of Modified Columns in Datawindow - the full story »

PowerBuilder – Simple ‘Windows Standard’ Row Selection

Posted on May 21, 2010 at 8:20 pm in

Allowing for ‘Windows Standard’ muli row selection is pretty straight forward.  By ‘Windows Standard’ I mean you can select a range by clicking on a row, holding the shift key and clicking on a second row to select all the rows between the two or by holding down the control key and clicking you can…

PowerBuilder – Simple ‘Windows Standard’ Row Selection - the full story »

Powerbuilder – Evaluating Arithmetic Expressions

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

Below is a function which allows the user to enter an arithmetic expression and then evaluate it and return the result.  This will work for addition (+), subtraction(-), multiplication(*), division(/), and exponentiation(^).   You can also enter parenthesis to change the order of precedence if needed.  You would call this from where ever you like to…

Powerbuilder – Evaluating Arithmetic Expressions - the full story »

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 »

Top