PowerBuilder Tips, Tricks, and Techniques

Berndt Hamboeck

Subscribe to Berndt Hamboeck: eMailAlertsEmail Alerts
Get Berndt Hamboeck: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

PowerBuilder: Article

SQL Anywhere 10 & DataWindow .NET 2.0 in an ASP Environment

Speeding up database development

Dataset Binding
In PowerBuilder, the DataWindow is used to display data to users and insert new data and update data into the database, since the DataWindow can handle the creation of the SQL statements needed on its own (including extensive programming support that can be used to react to errors or override default behavior).

All these capabilities are included in DataWindow.NET. DataWindow.NET 2.0 also supports using DataSets (which represent an in-memory cache of your data from the database) as the data source for a DataWindow object (the visual presentation from the database) since many .NET developers prefer to separate data access from data presentation (the Model-View-Controller pattern) and want to use the DataWindow only for its presentation capabilities. The data-binding model lets you do this. If you prefer to combine data access and presentation, you can use the retrieve and update model. The great advantage over built-in Visual Studio components is that a person designing the visual presentation can do this without knowing a programming language - everything can be done in the DataWindow designer. Later on the programmer takes the DataWindow control created and combines its business logic with the visual presentation (the DataWindow object) through the DataWindow control, which helps him by exposing a lot of events and additional properties.

From a WebForm App to a WinForm App
As mentioned above, the goal was to move the services screen to the Web. As you can see below, the existing WinForm services consist of two DataWindows. The upper one is a grid view of the entered services. The lower one is the editable DataWindow -the place where users change or enter a new service.

Figure 1 shows the "old" WinForm application and Figure 2 shows the new WebForm application. Doesn't look that different, does it? And this was exactly the goal we wanted to reach. The behavior and the look-and-feel should be much the same as before, and all of this should be done in a very short time, which is only possible if one can take the look and framework classes nearly unchanged from one environment to the other. (See Tables 2 & 2B)

Tips and Tricks
In this section I'll describe some questions that were raised when we used Visual Studio, SQL Anywhere, and DataWindow .NET together. This list isn't complete but should help you get started. (See Tables 3 & 3B)


  • Operating System: Windows Vista
  • Development tool: Visual Studio 2005 TeamSystem
  • DataWindow.NET 2.01: SQL Anywhere 10
SQL Anywhere and DataWindow .NET are a perfect combination for all your development needs. SQL Anywhere is an easy-to-use and powerful database. With DataWindow .NET, this combination speeds up database development dramatically; this was critical in a project that had an existing WinForm application and needed to be converted to a WebForm application with minimal effort and user interface changes. DataWindow .NET lets one design a complete view of the database (the actual user interface, the so-called DataWindow object) without any coding. The DataWindow object is then put in a WinForm or WebForm application by using the DataWindow control without any changes. It supports a developer with an extensive API including properties and events. Both products fit and integrate perfectly into the .NET world and the Visual Studio 2003 or 2005 IDE by supporting the use of DataSets and ADO.NET.

More Stories By Berndt Hamboeck

Berndt Hamboeck is a senior consultant for BHITCON (www.bhitcon.net). He's a CSI, SCAPC8, EASAC, SCJP2, and started his Sybase development using PB5. You can reach him under [email protected]

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.