Helping Developers Master PowerBuilder Classic and .NET

Yakov Werde

Subscribe to Yakov Werde: eMailAlertsEmail Alerts
Get Yakov Werde: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: Enterprise Architecture, Enterprise Application Performance

Blog Post

A Sane Way to Code DataObject Result Set Definitions in Syntax Mode

QweryBuilder and DataWindow Object Painter Integration

One of the minor DataWindow Object design annoyances I have accepted as a fact of life is the total lack of tool support when writing a SQL Select statement in Syntax mode.  I'm often forced into syntax mode by limited abilities of the GUI SQL painter.  In support what I imagined was my own personal preference, I have noticed over the years that many developers prefer typing SQL in syntax over using a graphical interface to generate their code.  It's often more than personal preference that drives me into sytax mode, just ask anyone who has watch their hand coded SQL get mangled or altogether deleted by the painter when converting syntax back to graphics.  I live by the rule, ‘Once in Syntax, Stay in Syntax'.  I must also say that I have not discovered any inherent performance advantage to using the painter generated PBSelect format over the standard SQL select syntax in a DataWindow Object.

When teaching new developers how to use the DataWindow Object painter to create DataWindow Objects (Classic 11.5 and before) I often showed the sneaky little trick of entering Syntax mode by faking out the painter.  That is: first select any table in the list, select any column from that table and then convert to syntax.  Once in syntax mode, delete whatever SQL was generated and write your own code.  I was forced into this kludge because that Convert to Syntax menu item was disabled until a column was selected in graphics mode

Recently, two discoveries caused me to revisit this topic.  The first; in both the Classic 12.0 and .NET IDEs the ‘fake out' is not necessary.  For some reason, you can now hit cancel on the table list and go right into Syntax mode without selecting a column.  The Convert to Syntax menu item is always enabled!  The second; I was introduced to, QweryBuilder, WerySoft's nice SQL tool that supports multiple DBMS'.  http://www.werysoft.com I always envisioned an intellisense like ability in the SQL editor to provide me with a list of database objects as I typed.  SQL AnyWhere's Interactive SQL tool has it (but you must hit Ctrl-Space to display the prompts). Microsoft SQL Studio Management Suite has intellisense like prompting as you type.  I found this ability in QweryBuilder too.  QueryBuilder has lots of unique and powerful features that go beyond my basic SQL editor needs.  The best part is that QweryBuilder supports Oracle and MS SQL Server in addition to Sybase ASE and ASA.  Follow this link  http://www.elearnitonline.com/BlogVideos/QweryBuilder-DWO.html to watch me demo building a DataWindow Object result set in 12.0 .NET set using QweryBuilder (PS you can do this in Classic 12.0 too and in prior this using the trick I described above)

More Stories By Yakov Werde

Yakov Werde, a 25 year IT industry veteran, is a member of TeamSybase and the newly formed Sybase Customer Evangelist Team. Yakov is a recognized author, speaker and trainer who has been designing and delivering PowerBuilder, .NET, EaServer, Web App Development, and Java training for over 14 years to corporate, military and government developers. Prior to discovering his aptitude as an educator, Yakov worked as an architect, project manager and application coder in the trenches of application software development. Yakov holds a Masters in Education with a specialty in instructional design for online learning from Capella University and a BS in math and computer science from Florida International University. Yakov, managing partner of eLearnIT LLC (www.elearnitonline.com), authors and delivers workshops and web based eLearning tutorials to guide professional developers toward PowerBuilder Classic and .NET mastery. Follow Yakov on Twitter as @eLearnPB