Here is an easy to implement user customization service you can add to your Powerbuilder applications which stores configuration information in a database. This gives the added benefit of portability to the users as nothing is stored in files or the registry. It is PFC based but, with minor modifications, could be un-coupled from that…
You are currently browsing the post archives for July 2010.
PowerBuilder – User Customization Service
Easy ANSI Join Conversion
Like many MS SQL users way back when I learned the standard syntax for selectstatements: SELECT customer.custId , customer.custName , address.addrType , address.addrAddress1 , address.addrSddress2 , csz.cszCity , csz.cszState , csz.cszZip , order.ordOrderNo , order.ordOrderDate , order.partId , part.partDesc FROM customer , address , csz , order , part WHERE address.custId = customer.custId AND csz.cszId…
Tools I use to get my work done.
This is a listing of the tools I use frequently at my job to get things done faster and more effectively. Notepad++ (www.notepad-plus-plus.org) – editorA great open source editor with great deal of customization and functionality built in. Might as well get the ‘Poor Mans SQL Formatter’ plug in while you are at it. SSMS…
PowerBuilder ‘Gotcha’ – Datawindow retrieval arguments
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.Create function
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 – ‘Plug in’ Applications
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 – Method to add minutes to a Datetime
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 – Single user sign on verification for SQL Anywhere
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 & MS SQLServer datetime methods
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 ‘Gotcha’ – dddw Edit Type
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…