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…
You are currently browsing the Programming category
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 – ‘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 & 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…
PowerBuilder – Simple datawindow column sort by click
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…
Frogpond – A Child’s Game
I created this simple game in PowerBuilder as an intellectual exercise as well as to give to my kids. This first version is very basic – you move the frog around to eat the flies. I plan on enhancing it as time permits. Instructions are included in a text file included in the Zip archive.…
PowerBuilder ‘Gotcha’ – pbm_dwnmousemove
If you are using ancestry in your application (and who doesn’t unless it’s really, really, really simple) verify that there isn’t an event mapped to pbm_dwnmousemove (or any other event ID for that matter). If there is an ancestor event mapped to this and it has no code you will be able to create a…