Power Builder Training
Power Builder Training
• Object-Orientation Implementation
• SQL Support
• Data Window
• Database Connectivity
• ODBC Drivers
• Definition Of PowerBuilder
• Create an icon for PowerBuilder under Windows NT/95. Start and stop
PowerBuilder.
Selecting 'File/PowerPanel' from the menu for seeing the desctriptive text and
shortcut for each icon.
Application Painter Application object is the entry point to any PowerBuilder application
Window Painter In any application, Window is the main interface between a user and a application.
Menu Painter A menu is a list of options or commands. Example your browser's menu.
Data Window object allows you to retrieve data from a database or other source for display .
A data window object consists of the following:
Data Source Definition : That is the data from where to bring i.e. database ,table, column etc.
Presentation Definition: Presentation style of the retrieved data from the database .
User Object allows you to reuse the code .It is nothing but a collection of one or more
Powerbuilder/Non PowerBuilder objects. Non PB Object includes objects from VB, Dlls ,OCX
and so on
Toolbars
What is a toolbar?
Answer: A toolbar is nothing but a collection of icons associated
with actions.
All the icons as shown in the picture below the menu, are part of
the toolbar called Powerbar.
• RichText Paragraphs of text with embedded data columns. Not supported by the Web
DataWindow or the Sybase DataWindow Web control for ActiveX.
• When the data in a column in a DataWindow has been changed and the
column loses focus (for example, because the user tabs to the next
column), the following sequence of events occurs:
• The DataWindow control converts the text into the correct datatype for the
column. For example, if the user is in a numeric column, the DataWindow
control converts the string that was entered into a number. If the data
cannot be converted, the ItemError event is triggered.
• If the data converts successfully to the correct type, the DataWindow
control applies any validation rule used by the column. If the data fails
validation, the ItemError event is triggered.
• If the data passes validation, then the ItemChanged event is triggered. If
you set an action/return code of 1 in the ItemChanged event, the DataWindow control
rejects the data and does not allow the focus to change. In this case, the ItemError event is
triggered.
• If the ItemChanged event accepts the data, the ItemFocusChanged event is triggered
next and the data is stored as an item in a buffer.
Original Status
• New!
– New! -
– NewModified ! Yes
– DataModified ! Yes
– NotModified! No
• NewModified!
– New! No
– NewModified! –
– DataModified! Yes!
– NotModified! New!
• DataModified!
– New! NewModified!
– NewModified! Yes
– DataModified! –
– NotModified! Yes
• NotModified!
– New! Yes
– NewModified! Yes
– DataModified! Yes
– NotModified! -
– Null Option This is a Yes/No option, which is used to determine whether or not a
column should accept a NULL value. A NULL is an empty undefined value that
shouldn't be confused with a zero-length string. The meaning of NULL is "unknown
value".
• To view the data that is stored in a table or to even alter/manipulate it, invoke popup menu on the table title and
select Edit Data > Appropriate Format option or click on one of the preview icons from the Painterbar.
• Importing Data At the moment PowerBuilder supports importing data from two file formats, namely tab delimited
text and the .DBF format. However, it is likely that in future releases more file formats will be supported.
• Exporting Data We've seen how to import data from a tab delimited text file. It may occur to you that it would be
useful to export data to some other format. To allow this PowerBuilder provides you with tools to support several
popular file formats.
• Sorting Data When you are in the data manipulation pane, you can display the data in any sorted order by selecting
Rows > Sort... menu option.
• Filtering DataIf you have a large table with a million rows and want to see only rows that belong to a specific
country, what you do? You put a WHERE clause in the SELECT statement to select only those rows that you want to
see.
• Displaying Rows Description
• While sorting, filtering, deleting and modifying data in the "Output (product) – Units", you may find it useful to see
the summary of the things done to the rows. You can see it by selecting 'Rows > Described...' menu option.
• Print Previewing, Zooming & Printing the Data
• You can print or preview the current display using the standard File menu options of 'Print...' and 'Print Preview'. In
Print Preview mode, you can turn on the Print Preview Rulers to let you adjust the margins and using the 'Print
Preview Zoom...' feature you can alter the magnification.