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

Sly Little Critter: The New Way to Save Data Inside a DWO

One of the techniques I use when building the PB rich client in a multi-tiered application is to mock the data set on the client

One of the techniques I use when building the PB rich client in a multi-tiered application is to mock the data set on the client side. This allows me to build the client before I have a server side connection. I simulate DataWindow data by creating a sample cross-section dataset and then ‘tucking' the data inside the DataWindow object syntax. This way the data will show when the data object is created without the need for a database connection.

In Classic you open the Data View of the DataWindow Object painter and then either manually insert rows or (if there is a data source definition) retrieve rows into the view when the DataWindow Object definition is saved. Figure 1 shows the Painter View.

Figure 1

As you can see from Listing 1, the data from the view is saved in the syntax.

Listing 1

Today I tried doing the same technique in PB 12.5 .NET. Figure 2 shows how to turn on the Data View in the new DataWindow Painter.

Figure 2

As you can see in Figure 3 the UI looks about the same.

Figure 3

But engineering slipped in a slight change in functionality that drove me crazy for over 30 minutes until I discovered it.

In the new painter I went about retrieving the data into the data view and sharing it with the preview to see the result. But every time I saved the DataWindow, the imported data was not stored with the definition!! I thought for sure this was a bug. I created a video screen capture and submitted it to engineering as a bug. Here's the video if you care to see it: http://www.screencast.com/t/pfKq1IsIC7. Then I noticed something different about the .NET DWO Painter Data View context menu. It has a Save Changes item, an item that is not on the Classic version. The Save Changes item is highlighted in Figure 4.

Figure 4

Hmmm, what's that? Sure enough data is only saved into the DataWindow Object syntax if you click the Save Changes item. Whoa, sneaky. Hopefully, sharing my experience will help you avoid the same trap someday.

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

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.