Monday, October 26, 2009

Powerbuilder 12.0 Beta

Powerbuilder 12.0 is on the way. Now, currently still in beta version. You can check the features and download the beta by clicking here.

Monday, October 19, 2009

What is Datawindow?

Datawindow Control

Datawindow Control is the heart of Powerbuilder. This is the control to communicate between the Database and the client user interface.

This is the BIGGEST different between Powerbuilder and the other programming languanges. In Powerbuilder, programmers start to make application from the database into datawindow control, then visualize into the other controls (like Dropdown, Radio Button, etc), column per column. Later, you can setup the properties for each column, like display properties, validation properties, etc.

It's very contradiction with Visual Basic (VB) for example. In VB, we put the control (Dropdown for example) at the form, the we setup the properties, how to connect into the database, table and column name at the last.

Take a look the images below:

Datawindow Painter Toolbar

To create a new Datawindow control, choose the database source, then Presentation Style.

Setup what the Table(s) and column(s) you want to display. Also setup the data criteria(s) and "sort by" value(s).

Last, setup the properties for each column, such as display properties, format properties, validation properties, position, etc.

What is Embedded SQL?

Embedded SQL is one of main feature in Powerbuilder. It's make possible to programmer to write the SQL Statement directly without declare in a variable.

Unlike the other programming language, In Powerbuilder you can write the SQL statement in script painter. It make more faster and more efficient for programmer, because the Powerbuilder compiler execute directly the statement and tell the programmer if they have a wrong SQL syntax.

The features supported when you use embedded SQL depend on the DBMS to which your application connects.

Since I've experiences in Ms. SQL Server for the database, I will show you an example with Ms. SQL Server SQL Statement. When you use the SQL Server database interface, you can embed the following types of SQL statements in scripts and user-defined functions:
  • Transaction management statements
  • Non-cursor statements
  • Cursor statements
  • Database stored procedures

See the picture for the example:

Thursday, October 15, 2009

[Application] How to use NET SEND in Powerbuilder

In Windows 2000 and XP, there is a command to send a message popup directly to other computers in network. Many of you, must know the command is NET SEND. In Vista, Microsoft remove this command.

Since I need this function in my office application, so in year 2003 I created a simple application to able user to send the message without type the command in DOS Command Prompt mode. I build this application with Sybase Powerbuilder version 6.5, and you can download here. Users don't need to open and close every time they want to use the application, since they able to minimize to tray icon when they click hide button. (See the smiley yellow icon in systray area, double click to open)

Since I made in my mother language, here's the translation of the menu / word:
Ka saha: Name of the computer (Must EXACT)
Nulis naon: Message
Leungitkeun tulisan: Delete the message after sent
Sok atuh: Send
Permios: Close
Keheula: Wait for sending...
Aya naon tuh, teu bisa euy: There's a problem during send the message
Teu bisa, kunaon nya: Cannot send the message
Enggeus tuh: Message Sent

One thing you must check, that the Messenger service must be started, to able the application send smoothly. To do this, Open Control Panel, the double click Administrative Tools Icon, the select Services. Make sure MESSENGER service is STARTED.

Application Name: U U Linan
Version: 2.0
PBL Name: REDAlert.PBL
PBL Version: 6.5

Wednesday, October 14, 2009

History of Powerbuilder

Starting when the year marked 1991. A company named Powersoft, launched Powersoft Powerbuilder version 1.0, exactly in July 1991. A product (code name "Headstart") with totaly sold in $5.2 million in just six months.

Less than a year later, Powersoft Powerbuilder 2.0 was lauched with sales climbed to $22.1 million. Some of new features was introduced in version 2.0 including Picture button control, some events, and Embedded SQL for BLOB support.

In 1993, version 3 went released, with huge of new feature, including MAPI, rbuttonclicked event, and also Watcom SQL.

Year later, Powerbuilder 4.0 lauched with some new features and enhancements, including Data pipeline and OLE 2 support.

Powerbuilder version 5.0 was released in 1995 under Sybase, Inc umbrella ( Sybase introduced the new feature, call Powerbuilder Foundation Class (or PFC). PFC is a foundation class or "platform" to help developers easier in they work. Also Info Maker was first introduce in this version.

Early 1997, Powerbuilder reached version 6.0, following by 6.5 a year later. This is the most stable of Powerbuilder has ever made (at least for me who started as Powerbuilder programmer, since this version). Lot of enhancements and new features in this version, including Internet Tools (mid of 90's is starting time for Internet technology booming), and Multi Platform support (Windows & Unix),

March 1999, Powerbuilder 7.0 was lauch to replace earlier version. With a new GUIs, this version brings some new feature, like New OLE DB database interface and New in component development and deployment (Building Jaguar components, Building Jaguar clients, etc)

Ten years since the first version launch, Powerbuilder reach version 8.0. Introduce Workspace and Target methode in this version, Powerbuilder version 8.0 came with Powersite Tool fully integration as the new Web targets feature. This means that you can now use PowerBuilder to create Web applications in addition to client executable applications and EAServer components

2003, Powerbuilder version 9.0 was launched, following the minor variant 9.01 and 9.02. In this version, programmer can set the script to save data in PDF file format, save Datawindow data in XML format, and support for Microsoft Windows Server 2003.

Version 10.0 and 10.5 of Powerbuilder, release between 2005 and 2006. Brings the .NET technology for the first time called: Datawindow .NET (Windows form). There are 2 minor change before 10.5 released: 10.01 (support Windows XP SP2) and 10.2 with Ink controls for the Tablet PC as a new feature.
For version 10.5 itself there are some new feature like DataWindow TreeView Presentation Style, DataWindow Autosize Height on all DataWindow Bands, DateTime Picker Control, Rich Text Control, BYTE and 28 Digit Decimal Data Type Support, New Icons and Bitmaps, etc.

Powerbuilder became version 11.0 in 2008 following by 2 minors version: 11.1 and 11.2. First time introduce .NET technology for Web form, and able to build non visual object as .NET web service. Version 11.1 has added feature for Windows Vista support, where AJAX support added in version 11.2.

The next couple of month (Q3 of 2008), Sybase release Powerbuilder 11.5 which include RichText Edit style for DataWindow columns, 3D Graph styles, Tooltips for DataWindow columns and controls and PNG support, also support for Ms. SQL 2008.

Sybase has a planning to release Powerbuilder 12.0 somewhere in 2009. Some new features including .NET graphical control integration, Complete .NET interoperatbility and a new type of target: the WPF target, will be introduced in this version.