• +33 1 41 31 82 82
  • This email address is being protected from spambots. You need JavaScript enabled to view it.

PowerBuilder 12.6 is EOL

PowerBuilder 12.6 is end of life

To get the latest version of PowerBuilder, visit Appeon PowerBuilder Website 

In PowerBuilder Classic, you can set docking behaviors for the sheets that open in the MDI (multiple document interface) frame window.

In this section:

Window Types and Docking States

New window types allow sheets to open in one of four states: docked, floating, tabbed document, or tabbed window.

The two new WindowType values are mdidock! and mdidockhelp!. Like mdi! and mdihelp!, you can open sheets (child windows) with the new OpenSheet functions.

Docked
The sheet is open and fixed in position relative to the Window object. The docked state is the default.
Floating
Users can move a floating sheet around or even outside the Window object.
TabbedDocument
Sheets that appear tabbed in the same area of the Window.
TabbedWindow
Docked windows that occupy the same area of the Window are in a tabbed group. The tabs are at the bottom.

You can get each opened sheet's status using the enumerated type WindowDockState.

  • WindowDockStateDocked!
  • WindowDockStateFloating!
  • WindowDockStateTabbedDocument!
  • WindowDockStateTabbedWindow!

Open Sheets in a Specific State

New versions of the OpenSheet function allow you to open a sheet at a specific docking location, in a specific tab group, or as a document.
You can programmatically open sheets in a specific state using these new PowerScript® functions:

  • OpenSheetAsDocument
  • OpenSheetDocked
  • OpenSheetInTabGroup
  • OpenSheetWithParmAsDocument
  • OpenSheetWithParmDocked
  • OpenSheetWithParmInTabGroup

Opens a sheet as a document within an MDI frame window for dockable windows.

Applies to

Windows objects

Syntax

OpenSheetAsDocument ( <sheetrefvar> {, <windowtype> }, <mdiframe>, <sheetname> {, <tabalign> } )
Argument Description
<sheetrefvar> The name of any window variable that is not an MDI frame window. OpenSheetAsDocument places a reference to the open sheet in <sheetrefvar>.
<windowtype> (optional) A string whose value is the datatype of the window you want to open. The datatype of <windowtype> must be the same or a descendant of <sheetrefvar>.
<mdiframe> The name of an MDI frame window.
<sheetname> A unique string identifier for the sheet, which is used when layout is persisted.
<tabalign> (optional) A boolean that, when used, creates a new tab group and indicates the alignment of the sheets in the group. When true, the tabs in the group align vertically. When false, the tabs align horizontally.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, OpenSheetAsDocument returns null. In some cases, such as if the <windowtype> argument is invalid, OpenSheetAsDocument throws a runtime error and does not return a value; therefore, it is recommended that you both test the return value and wrap the function call in a try-catch block.

Usage

Tabbed documents can be in more than one tab group. Users can create additional tab groups by dragging one tab outside of the current group. If there is more than one tab group, use the <mdiframe> argument to specify in which one to open a sheet. Instead of specifying the parent window, specify an already open sheet in the tab group where you want to open your new sheet.

Opens a sheet as a document within an MDI frame window for dockable windows. OpenSheetWithParmAsDocument also stores a parameter in the system's Message object so that it is accessible to the opened sheet.

Applies to

Windows objects

Syntax

OpenSheetWithParmAsDocument ( <sheetrefvar>, <parameter> {, <windowtype> }, <mdiframe>, <sheetname> {, <tabalign> } )
Argument Description
<sheetrefvar> The name of any window variable that is not an MDI frame window. OpenSheetWithParmAsDocument places a reference to the open sheet in <sheetrefvar>.
<parameter> The parameter you want to store in the Message object when the sheet is opened. <Parameter> must have one of these datatypes:
  • String
  • Double
  • PowerObject
<windowtype> (optional) A string whose value is the datatype of the window you want to open. The datatype of <windowtype> must be the same or a descendant of <sheetrefvar>.
<mdiframe> The name of an MDI frame window.
<sheetname> A unique string identifier for the sheet, which is used when layout is persisted.
<tabalign> (optional) A boolean that, when used, creates a new tab group and indicates the alignment of the sheets in the group. When true, the tabs in the group align vertically. When false, the tabs align horizontally.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null,OpenSheetWithParmAsDocument returns null. In some cases, such as if the <windowtype> argument is invalid,OpenSheetWithParmAsDocument throws a runtime error and does not return a value; therefore, it is recommended that you both test the return value and wrap the function call in a try-catch block.

Usage

Tabbed documents can be in more than one tab group. Users can create additional tab groups by dragging one tab outside of the current group. If there is more than one tab group, use the <mdiframe> argument to specify in which one to open a sheet. Instead of specifying the parent window, specify an already open sheet in the tab group where you want to open your new sheet.

The system Message object has three properties for storing data. Depending on the datatype of the parameter specified for OpenSheetWithParmAsDocument, scripts for the opened sheet would check one of the following properties.

Message object property Argument datatype
Message.DoubleParm Double
Message.PowerObjectParm PowerObject (PowerBuilder objects, including user-defined structures)
Message.StringParm String

In the opened window, it is a good idea to access the value passed in the Message object immediately (because some other script may use the Message object for another purpose).

NoteWhen you pass a PowerObject as a parameter, you are passing a reference to the object. The object must exist when you refer to it later or you get a null object reference, which causes an error. For example, if you pass the name of a control on a window that is being closed, that control will not exist when a script accesses the parameter.

Opens a sheet docked in a specified position within an MDI frame window for dockable windows. OpenSheetWithParmDocked also stores a parameter in the system's Message object so that it is accessible to the opened sheet.

Applies to

Windows objects

Syntax

OpenSheetWithParmDocked ( <sheetrefvar>, <parameter> {, <windowtype> }, <mdiframe>, <position>, <sheetname> )
Argument Description
<sheetrefvar> The name of any window variable that is not an MDI frame window. OpenSheetWithParmDocked places a reference to the open sheet in <sheetrefvar>.
<parameter> The parameter you want to store in the Message object when the sheet is opened. <Parameter> must have one of these datatypes:
  • String
  • Double
  • PowerObject
<windowtype> (optional) A string whose value is the datatype of the window you want to open. The datatype of <windowtype> must be the same or a descendant of <sheetrefvar>.
<mdiframe> The name of an MDI frame window.
<position> An enumerated type that specifies where to dock the sheet:
  • WindowDockLeft!
  • WindowDockRight!
  • WindowDockTop!
  • WindowDockBottom!
<sheetname> A unique string identifier for the sheet, which is used when layout is persisted.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, OpenSheetWithParmDocked returns null. In some cases, such as if the <windowtype> argument is invalid, OpenSheetWithParmDocked throws a runtime error and does not return a value; therefore, it is recommended that you both test the return value and wrap the function call in a try-catch block.

Usage

The system Message object has three properties for storing data. Depending on the datatype of the parameter specified for OpenSheetWithParmFromDocked, scripts for the opened sheet would check one of the following properties.

Message object property Argument datatype
Message.DoubleParm Double
Message.PowerObjectParm PowerObject (PowerBuilder objects, including user-defined structures)
Message.StringParm String

In the opened window, it is a good idea to access the value passed in the Message object immediately (because some other script may use the Message object for another purpose).

Note

When you pass a PowerObject as a parameter, you are passing a reference to the object. The object must exist when you refer to it later or you get a null object reference, which causes an error. For example, if you pass the name of a control on a window that is being closed, that control will not exist when a script accesses the parameter.

Opens a sheet in a tab group within an MDI frame window for dockable windows.

Applies to

Windows objects

Syntax

OpenSheetInTabGroup ( <sheetrefvar> {, <windowtype> }, <siblingname>, <sheetname> )
Argument Description
<sheetrefvar> The name of any window variable that is not an MDI frame window. OpenSheetInTabGroup places a reference to the open sheet in <sheetrefvar>.
<windowtype> (optional) A string whose value is the datatype of the window you want to open. The datatype of <windowtype> must be the same or a descendant of <sheetrefvar>.
<siblingname> The name of a sibling window in either a docked state or in a non-document tab group. The sheet opens in that tab group.
<sheetname> A unique string identifier for the sheet, which is used when layout is persisted.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, OpenSheetInTabGroup returns null. In some cases, such as if the <windowtype> argument is invalid, OpenSheetInTabGroup throws a runtime error and does not return a value; therefore, it is recommended that you both test the return value and wrap the function call in a try-catch block.

Usage

The first sheet opened in a main window cannot be opened using OpenSheetInTabGroup or OpenSheetWithParmInTabGroup. To create a tab group, open the first sheet as a docked sheet and then use that sheet as the <siblingname> argument.

Opens a sheet in a tab group within an MDI frame window for dockable windows. OpenSheetWithParmInTabGroup also stores a parameter in the system's Message object so that it is accessible to the opened sheet.

Applies to

Windows objects

Syntax

OpenSheetWithParmInTabGroup ( <sheetrefvar>, <parameter> {, <windowtype> }, <siblingname>, <sheetname> )
Argument Description
<sheetrefvar> The name of any window variable that is not an MDI frame window. OpenSheetWithParmInTabGroup places a reference to the open sheet in <sheetrefvar>.
<parameter> The parameter you want to store in the Message object when the sheet is opened. <Parameter> must have one of these datatypes:
  • String
  • Double
  • PowerObject
<windowtype> (optional) A string whose value is the datatype of the window you want to open. The datatype of <windowtype> must be the same or a descendant of <sheetrefvar>.
<siblingname> The name of a sibling window in either a docked state or in a non-document tab group. The sheet opens in that tab group.
<sheetname> A unique string identifier for the sheet, which is used when layout is persisted.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, OpenSheetWithParmInTabGroup returns null. In some cases, such as if the <windowtype> argument is invalid, OpenSheetWithParmInTabGroup throws a runtime error and does not return a value; therefore, it is recommended that you both test the return value and wrap the function call in a try-catch block.

Usage

The first sheet opened in a main window cannot be opened using OpenSheetInTabGroup or OpenSheetWithParmInTabGroup. To create a tab group, open the first sheet as a docked sheet and then use that sheet as the <siblingname> argument. The system Message object has three properties for storing data. Depending on the datatype of the parameter specified for OpenSheetWithParmFromDockingState, scripts for the opened sheet would check one of the following properties.

Message object property Argument datatype
Message.DoubleParm Double
Message.PowerObjectParm PowerObject (PowerBuilder objects, including user-defined structures)
Message.StringParm String

In the opened window, it is a good idea to access the value passed in the Message object immediately (because some other script may use the Message object for another purpose).

Note

When you pass a PowerObject as a parameter, you are passing a reference to the object. The object must exist when you refer to it later or you get a null object reference, which causes an error. For example, if you pass the name of a control on a window that is being closed, that control will not exist when a script accesses the parameter.

 

Sample code for opening docked windows and tabbed documents.

Procedure

Windows objects

  1. Create a window w_sheet_any as a main! window type.
  2. In the open event of w_sheet_any, add this code:
    string ls_i  
    ls_i = Message.stringparm  
    if not isnull(ls_i) and ls_i <> "" then
          this.title = ls_i  
    end if
  3. Create an MDIDock window w_mdidock_dockstate and set any menu in it.
  4. In the open event of w_mdidock_dockstate, add this code:
    window win[]  
    OpenSheetWithParmDocked(win[1], "1", "w_sheet_any", this, WindowDockLeft!, "") OpenSheetWithParmInTabGroup(win[2], "2", "w_sheet_any", this, "") OpensheetWithParmInTabGroup(win[3], "3", "w_sheet_any", win[1], "") OpenSheetWithParmAsDocument(win[4], "4", "w_sheet_any", this, "") OpenSheetWithParmAsDocument(win[5], "5", "w_sheet_any", win[4], "") OpenSheetWithParmAsDocument(win[6], "6", "w_sheet_any", this, "", false) OpenSheetWithParmAsDocument(win[7], "7", "w_sheet_any", win[5], "") OpenSheetWithParmAsDocument(win[8], "8", "w_sheet_any", win[6], "")
  5. Run the application
    You will see windows 1 and 3 as a tabbed group, with the tabs at the bottom. Sheets 4, 5, and 7 appear as tabbed documents together, as do 6 and 8, both groups with tabs at the top. Window 2 is alone and untabbed.

Persist the MDI State

You can set the application so that, when the user launches the application, the sheets are open in the same position and state as when the user closed it.

To persist the states of opened sheets, it is important to associate a meaningful string ID with each opened sheet. There are two ways to do this:

  • Set it as an argument when using the OpenSheetAsDocument, OpenSheetWithParmAsDocument,OpenSheetDocked, OpenSheetWithParmDocked, OpenSheetInTabGroup, orOpenSheetWithParmInTabGroup function.
  • Set it using the SetSheetID function.

You can use a function to store the MDI state in the registry when the application closes. You can then use other functions to load and open the sheets in their docking states, and present them.

Sets the unique identifier for an open sheet.

Applies to

Window objects

Syntax

<controlname>.SetSheetID ( <sheetname> )
Argument Description
<controlname> The open sheet to be identified.
<sheetname> A unique string identifier for the sheet, which is used when layout is persisted.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, SetSheetID returns null.

Usage

If no sheet indentifier was set when it was opened by one of the OpenSheet functions, you can set an ID using theSetSheetID function. You can also change a sheet's ID.

Example

window win[]  OpenSheetDocked(win[1], this, WindowDockLeft!, "")  win[1].SetSheetID("sheet1")

 

Stores the MDI state in the registry.

Applies to

Window objects

Syntax

SaveDockingState ( <regkey> )
Argument Description
<regkey> The <regkey> argument is the registry key. If no entry for the key exists in the registry, one is created. Existing keys are overwritten.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, SaveDockingStatereturns null.

Usage

You can set the application so that it saves the states of the open sheets. You should call this function when the application closes.

Example

Save all sheets in register
integer li_rtn  string is_register = "Sybase\PowerBuilder\Examples\Docking\"  li_rtn = this.SaveDockingState (is_register)

 

Loads two arrays of equal size: type names of persisted sheets and the corresponding IDs.

Applies to

Window objects

Syntax

LoadDockingState ( <regkey>, <windowtypes>, <sheetnames> )
Argument Description
<regkey> The registry key where the information was stored using theSaveDockingState function.
<windowtypes> A string array of window types for all the child windows that were persisted.
<sheetnames> A string array of the unique IDs for the persisted child windows corresponding to the types in the <windowtypes>array.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, LoadDockingStatereturns null.

Usage

To retrieve the MDI states that were saved using the SaveDockingState function, use LoadDockingState to get the window information from the registry. Next, use OpenSheetFromDockingState orOpenSheetWithParmFromDockingState to open each of the persisted sheets. Finally, use CommitDocking to do the final arrangement and make the sheets visible.

Opens one or more persisted sheets within an MDI frame window for dockable windows.

Applies to

Windows objects

Syntax

OpenSheetFromDockingState ( <sheetrefvar> {, <windowtype> }, <mdiframe>, <sheetname> )
Argument Description
<sheetrefvar> The name of any window variable that is not an MDI frame window. OpenSheetFromDockingState places a reference to the open sheet in <sheetrefvar>.
<windowtype> (optional) A string whose value is the datatype of the window you want to open. The datatype of <windowtype> must be the same or a descendant of <sheetrefvar>.
<mdiframe> The name of an MDI frame window.
<sheetname> The unique string identifier for the sheet.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, OpenSheetFromDockingState returns null.

Usage

Open persisted sheets in their saved docking states.

Opens one or more persisted sheets within an MDI frame window for dockable windows.OpenSheetWithParmFromDockingState also stores a parameter in the system's Message object so that it is accessible to the opened sheet.

Applies to

Windows objects

Syntax

OpenSheetWithParmFromDockingState ( <sheetrefvar>, <parameter> {, <windowtype> }, <mdiframe>, <sheetname> )
Argument Description
<sheetrefvar> The name of any window variable that is not an MDI frame window. OpenSheetWithParmFromDockingState places a reference to the open sheet in <sheetrefvar>.
<parameter> The parameter you want to store in the Message object when the sheet is opened. <Parameter> must have one of these datatypes:
  • String
  • Double
  • PowerObject
<windowtype> (optional) A string whose value is the datatype of the window you want to open. The datatype of <windowtype> must be the same or a descendant of <sheetrefvar>.
<mdiframe> The name of an MDI frame window.
<sheetname> The unique string identifier for the sheet.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null,OpenSheetWithParmFromDockingState returns null.

Usage

The system Message object has three properties for storing data. Depending on the datatype of the parameter specified for OpenSheetWithParmFromDockingState, scripts for the opened sheet would check one of the following properties.

Message object property Argument datatype
Message.DoubleParm Double
Message.PowerObjectParm PowerObject (PowerBuilder objects, including user-defined structures)
Message.StringParm String

In the opened window, it is a good idea to access the value passed in the Message object immediately (because some other script may use the Message object for another purpose).

Note

When you pass a PowerObject as a parameter, you are passing a reference to the object. The object must exist when you refer to it later or you get a null object reference, which causes an error. For example, if you pass the name of a control on a window that is being closed, that control will not exist when a script accesses the parameter.

After all persisted sheets are opened, this function arranges them and makes them visible.

Applies To

Window objects

Syntax

CommitDocking()

Usage

When all persisted sheets are opened using the LoadDockingState and OpenSheetFromDockingState orOpenSheetWithParmFromDockingState, the CommitDocking function does the work of arranging everything in place and making it all visible.

Example

Restore all sheets for register

string s1[], s2[]  
string is_register = "Sybase\PowerBuilder\Examples\Docking\"  
integer li_start, li_end, li_i, li_rtn  
li_rtn = LoadDockingState(is_register,s1,s2)  
window lw_window  li_start = lowerbound(s1)  
li_end = upperbound(s2)
    
for li_i = li_start to li_end
  	openSheetFromDockingState(lw_window,s1[li_i], this, s2[li_i])  
next  
CommitDocking()

Properties for Dockable Windows

Customize the behavior and appearance of the windows and tabs.

These properties are similar to existing properties for

Options for Child Windows

WindowDockOptions are for child windows to specify how they can be opened:

  • WindowDockOptionAll!
  • WindowDockOptionTabbedDocumentOnly!
  • WindowDockOptionDockedOnly!
  • WindowDockOptionFloatOnly!
  • WindowDockOptionTabbedDocumentAndDockedOnly!
  • WindowDockOptionTabbedDocumentAndFloatOnly!
  • WindowDockOptionDockedAndFloatOnly!

Tabs

Properties for the shapes of the tabs:

  • windowdocktabslanted!
  • windowdocktabrectangular!
  • windowdocktabsingleslanted!

Location of the close button on a tab, if any:

  • windowdocktabclosebuttonnone!
  • windowdocktabclosebuttononactive!
  • windowdocktabclosebuttonshared!

Colors of tabs:

  • gradients are available
  • default to theme colors is available

Icon and Scroll Button for tabbed windows or documents:

  • TabbedWindowTabIcon / TabbedDocumentTabIcon
  • TabbedWindowTabScroll / TabbedDocumentTabScroll

Tabbed Window and Document Title Bars

Colors of tabbed window and document title bars:

  • TabbedWindowActiveTabBackColor / TabbedDocumentActiveTabBackColor
  • TabbedWindowActiveTabGradientBackColor / TabbedDocumentActiveTabGradientBackColor
  • TabbedWindowActiveTabTextColor / TabbedDocumentActiveTabTextColor
  • TabbedWindowInActiveTabBackColor / TabbedDocumentInActiveTabBackColor
  • TabbedWindowInActiveTabGradientBackColor / TabbedDocumentInActiveTabGradientBackColor
  • TabbedWindowInActiveTabTextColor / TabbedDocumentInActiveTabTextColor
  • TabbedWindowMouseoverTabBackColor / TabbedDocumentMouseoverTabBackColor
  • TabbedWindowMouseoverTabGradientBackColor / TabbedDocumentMouseoverTabGradientBackColor
  • TabbedWindowMouseoverTabTextColor / TabbedDocumentMouseoverTabTextColor
  • TabbedWindowTabsAreaColor / TabbedDocumentTabsAreaColor
  • TabbedWindowTabsAreaGradientColor / TabbedDocumentTabsAreaGradientColor
  • TabbedWindowTabsAreaGradientVert / TabbedDocumentTabsAreaGradientVert

Title bar states:

  • TitleBarActiveColor / TitleBarInActiveColor
  • TitleBarActiveGradientColor / TitleBarInActiveGradientColor
  • TitleBarActiveGradientVert / TitleBarInActiveGradientVert
  • TitleBarActiveaTextColor / TitleBarInActiveTextColor

 

PowerBuilder 12.6 is EOL

PowerBuilder 12.6 is end of life

To get the latest version of PowerBuilder, visit Appeon PowerBuilder Website 

Migration Information

You can migrate a PowerBuilder application from any version of PowerBuilder directly to PowerBuilder Classic. You cannot migrate applications from PowerBuilder .NET to PowerBuilder Classic, or from PowerBuilder Classic to older versions of PowerBuilder.
Migrate older applications to PowerBuilder Classic before you port them to PowerBuilder .NET.

Migration to PowerBuilder .NET

The WPF Window Application wizard in PowerBuilder .NET provides an option for converting a standard PowerBuilder Classic client/server or a Windows Forms target to a WPF Window Application target. The .NET Assembly wizard in PowerBuilder .NET provides an option to convert a PowerBuilder Classic .NET Assembly target.

After you select these conversion options and click Finish, the wizards automatically migrate the PowerBuilder Classic targets you select. However, you may still need to manually refactor some applications after you convert them.

This table lists some of the features that require special attention after you migrate applications from PowerBuilder Classic. Topic references in the table are to the PowerBuilder .NET Features Guide.

Feature Effect of Migration
Accelerator characters Ampersand (&) changed to underscore (_). See Accelerator Characters in Control Labels.
Conditionalized (preprocessor) code blocks Invalid code blocks for PowerBuilder .NET are maintained, but ignored. See Conditional Compilation in PowerBuilder .NET Targets.
Control handles Controls nested in windows do not have their own handles. See Modified and Unsupported Features in PowerBuilder .NET .
Dashes in identifiers Dashes are replaced with a string you can select in the target wizard. See Coding Restrictions.
Event sequence May require manual refactoring. See Modified and Unsupported Features in PowerBuilder .NET .
GroupBox controls Controls that are inside a GroupBox belong to the GroupBox, not to the container of the GroupBox. SeeSemantic Differences.
Large application migration May cause OutOfMemory error. Turn on 3G switch to avoid this error. See Memory Tuning for Large Applications.
Menu and toolbar styles Maintained from PowerBuilder Classic. If you migrate PowerBuilder applications earlier than 11.0, menus and toolbars use traditional styles. See Selecting a Toolbar Styleand Menu Styles in PowerBuilder .NET.
Non-TrueType fonts Visible at design time, but replaced at runtime. See Modified and Unsupported Features in PowerBuilder .NET .
Pipeline and Query objects Imported, but ignored at runtime. See Modified and Unsupported Features in PowerBuilder .NET .
Resource files Resource directories that you select in the wizard are copied relative to the new target path, based on the relative path to the original target. See Adding Resources to a Target andProject Painter User Interface.
Skins Default skins are attributed to migrated applications. SeeSkin Selection for Applications and Controls,

The WPF application includes migration options for applications with dashes in identifiers and with right-to-left formatting. If you click Finish before making a migration option selection, the wizard migrates the application using default settings for these options.

Migration to PowerBuilder Classic

You can migrate applications from any earlier version of PowerBuilder to PowerBuilder Classic 12.6.

Before you migrate, back up your files and use the Migration Assistant to identify obsolete code. The applications you build using the current version of PowerBuilder must be deployed with the PowerBuilder runtime DLLs from the current version.

Note

The "Migrating PowerBuilder Applications" technical document at http://wiki.scn.sap.com/wiki/display/SYBPB/Migrating+PowerBuilder+Applications published on SAP site includes information on changes to PowerBuilder since version 6.5 that might affect the conversion of applications to a more recent PowerBuilder version.

In this section:

When you migrate .NET Web Service components, you might need to remove or install supporting files on development and deployment computers.

If you deployed .NET projects from earlier versions of PowerBuilder, verify or complete these steps before redeploying the migrated .NET projects:

  • For .NET Windows Forms projects, select Full for the project rebuild type before you redeploy your applications from PowerBuilder Classic for the first time.
  • For .NET Web Service targets, clear ASP.NET temporary files for the application or component on development computers and production servers.
    The temporary files are located in the C:\WINDOWS\Microsoft.NET\Framework\<version>\Temporary ASP.NET Files\<projectName> directory, where <version> is typically v2.0.50727, and <projectName> is the project’s Web application name or its Web service virtual directory name.
  • For all .NET targets, uninstall earlier versions of PowerBuilder runtime files (system assemblies and win32 DLLs) on all deployment computers or servers, then install the runtime files for the current version of PowerBuilder using the Runtime Packager or another tool, as described in the “Checklist for deployment” section of the Deploying Applications and Components to .NET book.
  • To migrate a PowerBuilder 12.0 or 12.1 solution, open its .PBWX file using the File menu. If you double-click or drag and drop the file into PowerBuilder .NET 12.6, the Visual Studio Conversion wizard opens, inappropriately. You can use the double-click and drag-and-drop methods to open PowerBuilder 12.6 solutions.

 

Note
You can convert .NET Windows Forms targets to WPF targets in PowerBuilder .NET. SAP suggests that you migrate older .NET Windows Forms targets to PowerBuilder Classic before you convert them to WPF targets. You cannot directly convert .NET Assembly targets in PowerBuilder Classic to .NET Assembly targets in PowerBuilder .NET.

Migrating EAServer targets from earlier versions of PowerBuilder to PowerBuilder Classic may require some additional considerations. PowerBuilder .NET does not support EAServer targets.

Migrating Components to EAServer 6.0.1 or Later

Intercomponent calls from a PowerBuilder component running in EAServer 6.0.1 require proxies for all called components. In earlier versions of EAServer, a PowerBuilder component can sometimes call another PowerBuilder component running in the same server without the use of a proxy, because the PowerBuilder VM dynamically creates a proxy for the component using method names that match the names of the component's methods.

In EAServer 6.0.1 and later, PowerBuilder components are wrapped as EJBs, providing an extra layer of security and preventing the PowerBuilder VM from dynamically generating a proxy with names that match the component's method names. Therefore, you must create a proxy object for all components you invoke with intercomponent calls. Without a proxy object, the TransactionServer object cannot obtain the correct method names of the component you are calling.

Accessing EAServer Components from .NET Targets

PowerBuilder installs the EAServer DLLs, com.sybase.iiop.net.dll and com.sybase.ejb.net.dll, in the Global Assembly Cache (GAC) on the development computer, and requires these DLLs on runtime computers for applications that access EAServer components from .NET targets. You can use the Runtime Packager to place these DLLs in the GAC on deployment computers.

Note
The DLLs intalled by the PowerBuilder setup program have been tested, and are compatible with EAServer 6.3.1. However, if you use an EAServer version other than 6.3.1, SAP recommends that you copy the DLLs from the EAServer/Lib directory to the GAC of all computers where you deploy your applications. If you then run or re-run the Runtime Packager, you must also recopy these DLLs to the GAC, because the Runtime Packager overwrites them.

Creating an EJB Client Proxy for an EAServer 6.x Component

Building EJB client applications for EJBs running in EAServer 6.x requires additional steps when you create the EJB client proxy.

Procedure

  1. Copy the <packagename> directory from the %DJC_HOME%\deploy\ejbjars\ directory on the server to the client computer, where <packagename> is the package that contains the EJB you want to use.
  2. In the Select EJB Component dialog box that you open from the EJB Client Proxy project painter, add this directory to the class path.
  3. Generate the proxy.

Creating a Client Application for an EAServer 6.x EJB Component

Building EJB client applications for EJBs running in EAServer 6.x requires additional steps when you create the client.

Procedure

  1. Copy the eas-server-15.jar file (or eas-server-16.jar if you are using JDK 1.6.x) from the %DJC_HOME%\lib directory to the client computer and include its full path in the client’s CLASSPATH.
  2. Copy the stub files from %DJC_HOME%\genfiles\java\classes\ directory to the client computer and include this path in the client’s CLASSPATH. Copy the <packagename> directory from the %DJC_HOME%\deploy\ejbjars\ directory on the server to the client computer, where <packagename> is the package that contains the EJB you want to use, and include this path in the client’s CLASSPATH.
    If you copied these files and directories to a directory on the client called EAServer6, and you want to use an EJB in a package named datamapping, the client CLASSPATH setting might look like this:
    Classpath=D:\EAServer6\lib\eas-server-15.jar;D:\EAServer6\genfiles\java\classes;D:\EAServer6\deploy\ejbjars\datamapping

In PowerBuilder versions 10.5 and later, you cannot use system types as variable names in Web service proxies.

If a PowerBuilder system type is used as a variable name, the Web Service Proxy wizard renames the variable by applying the prefix ws_. If you are migrating Web service applications from PowerBuilder 10.2 or earlier, and regenerating the Web service proxies in PowerBuilder 10.5 or later, you may need to modify your code to reflect the change in variable names.

PowerBuilder system types include not only the objects and controls listed on the System tab page in the PowerBuilder Browser, but also the enumerated types listed on the Enumerated page in the Browser, such as band, button, encoding, location, and weekday. For example, if you build a Web service from a PowerBuilder custom class user object, and one of its functions has a string argument named <location>, in the proxy generated for that Web service, the argument is changed to <ws_location>.

In PowerBuilder 10.5.2 and later, when you use the OLE DB database interface with a Microsoft SQL Server database and retrieve data into a DataWindow, or use an embedded SQL cursor in a SELECT statement, server-side cursors help to support multiple command execution.

If this has a negative impact on performance, try increasing the size of the Block database parameter to 500 or more, or adding the following line to the [Microsoft SQL Server] section in the PBODB initialization file to turn off server-side cursors:

 ServerCursor = 'NO'
      

A change was made in PowerBuilder 10.2.1 Build 9716, PowerBuilder 10.5.1 Build 6505, and PowerBuilder 11.0 Build 5021, to correct an anomalous behavior when the SelectedTab property was applied at runtime to a tab for which the Visible property was set to false.

As a result of this change, there is a change in the behavior of the OpenTab and OpenTabWithParm functions. In earlier versions, calling the OpenTab or OpenTabWithParm function to open a user object as a tab page displayed the tab page even if the user object’s Visible property was set to false. In the current version, the user object’s Visible property must be set to true for the tab page to appear.

If your application uses the ImportFile method to import very large text files into a DataWindow or DataStore, ImportFile returns the error code -15.

PowerBuilder versions 10.0 and later are Unicode enabled. Earlier ANSI versions of PowerBuilder were able to import larger text files

Note
The release bulletins for earlier versions listed the size limit for large files as approximately 839,000 lines. However, the size limit depends on the number of columns in the files, as well as the number of lines.


PowerBuilder 12.6 is EOL

PowerBuilder 12.6 is end of life

To get the latest version of PowerBuilder, visit Appeon PowerBuilder Website 

Requirements

Identify the requirements for PowerBuilder 12.6

Identify the software requirements for PowerBuilder.

Table 1: System Requirements for PowerBuilder
Product Computer Minimum memory Hard disk space Operating system
This table provides system requirements for each product in PowerBuilder. All products require a DVD-ROM drive. The disk space requirements provided are approximate. The actual disk space you need for each product might vary depending on hard disk size, partitioning, and the features you choose to install. Additional temporary space is required on the hard disk during installation for uncompressing install files.
PowerBuilder Pentium 4 or higher 512MB 656MB for all components Windows XP Professional with SP 3, Windows Vista 32- or 64-bit Business with SP2, Windows 7 32- or 64-bit with SP1, Windows 8.1, Windows Server 2008 32- or 64-bit with SP2, or Windows Server 2012.1
InfoMaker Pentium 4 or higher 256MB 332MB for all components2 Windows XP Professional with SP 3, Windows Vista 32- or 64-bit Business with SP2, Windows 7 32- or 64-bit with SP1, Windows 8.1, Windows Server 2008 32- or 64-bit with SP2, or Windows Server 20121.
SQL Anywhere 400 MHz or higher Pentium-compatible 48MB in addition to memory required by the operating system 337MB for all components not including UltraLite and Windows Mobile Windows XP, Windows XP Tablet PC Edition, Windows Server 2003, and Windows Vista, Windows 7, and Windows Server 2008 (x86, x64, IA64)1.

(1) Supports Windows Server 2008 and 2012 runtime only, not development.
(2) Less disk space is required if PowerBuilder is installed on the same computer.

Table 1: Required Software for PowerBuilder features
Feature Required Software
The following table lists the software required for PowerBuilder features.

Install any required framework packages and SDKs before you install PowerBuilder. Microsoft developer software is available from the Microsoft Download Center.

Read this table carefully to determine whether you need to install any software before you run the setup program, and whether you need to install SQL Anywhere before installing PowerBuilder. If you select a feature with a prerequisite that is not yet installed, the setup program displays a warning message.

.NET target development and deployment Microsoft .NET Framework Version 4.0 or later, Visual Studio 2010 SP1.

This required software can be automatically installed for you during PowerBuilderinstallation, requiring an internet connection.

.NET Windows Forms smart client deployment and update and support for OLE controls in Windows Forms Microsoft .NET Framework Version 4.0 or later.

For design time only, Microsoft .NET Framework 4.0 Software Development Toolkit (SDK) or later.

WCF Client, REST Client, and Web Service DataWindow inPowerBuilder .NET Microsoft .NET Framework Version 4.0 or later.

For design time only, Microsoft Windows SDK for Windows 7 and .NET Framework 4.0 or later, referred to elsewhere in this document as .NET Framework 4.0 SDK.

WPF smart client development and update Microsoft .NET Framework Version 4.0 or later.

For design time only, .NET Framework 4.0 SDK or later.

.NET Web services local host deployment Microsoft Internet Information Services (IIS) 5.0 or higher.
NoteOn the development computer, IIS is not required for PowerBuilder applications or components unless the same computer is used a server for smart client applications, or for Web service components. IIS is also not required on end users’ computers.
For information about configuring IIS, see Deploying Applications and Components to .NET in the help.
PowerBuilder and InfoMaker tutorials, demo databases, and sample applications SQL Anywhere 16.

SQL Anywhere is available on the DVD. If the setup program does not detect SQL Anywhere 16 on your computer, it displays a warning.

If you choose to continue, the setup program does not install the tutorials or register the demo databases. To use these features later, install SQL Anywhere first, then reinstall PowerBuilder, InfoMaker, or both.

MobiLink™ synchronization Adaptive Server® Anywhere 9.0.2 to SQL Anywhere 16.

MobiLink is a component of Adaptive Server Anywhere and SQL Anywhere. In the SQL Anywhere setup program, select Synchronization and Messaging, and then MobiLink.

EAServer component and Web DataWindow development and deployment EAServer 6.3.1.

Run the setup program in the PBVM directory on the DVD to install runtime files and the Web DataWindow server component in EAServer.

EJB client development EAServer 6.3.1, or another J2EE-compliant application server such as BEA WebLogic 8.1 and later, or IBM WebSphere 6.x. SAP JVM.

The SAP JVM is installed in the Sybase\Shared\PowerBuilder\sapjvm7 directory when you install PowerBuilder.

Web service clients and Web Service DataWindow in PowerBuilder Classic Microsoft .NET Framework Version 4.0 or later.

For design time only, Microsoft .NET Framework 4.0 SDK or later.

Saving DataWindows as PDF using the Ghostscript distiller and PostScript printing Ghostscript and PostScript printer driver.
Saving DataWindows as PDF using XSL Formatting Objects (FO) and Java printing SAP JVM and Apache FO processor.

The SAP JVM is installed in the Sybase\Shared\PowerBuilder\sapjvm7 directory when you install PowerBuilder.

The Apache FO processor is installed in the Sybase\Shared\PowerBuilder\fop-0.20.5 directory when you install PowerBuilder.

PowerDesigner® plug-in PowerDesigner 15.3 ESD #9.

An evaluation version is available on the PowerDesigner page of the SAP Web site.

Data access using the ADO.NET interface Microsoft .NET Framework Version 4.0 or later Redistributable Package.
JDBC connectivity SAP JVM.

SAP JVM is installed in the Sybase\Shared\PowerBuilder\sapjvm7 directory when you install PowerBuilder.

Runtime Packager Microsoft Windows Installer.

Microsoft Windows Installer is installed by default on all supported Windows platforms.

 

Run the PowerBuilder setup program to install PowerBuilder .NET and PowerBuilder Classic.

Prerequisites

You must have Administrator privileges to fully install this product.

Procedure

  1. On the Choose Destination Location page, click Next to accept the destination folder path shown, or clickBrowse and select a different path, click OK, then click Next.
  2. On the Choose Destination Location For Shared Files page, click Next to accept the destination folder path shown, or browse to select the Sybase\Shared directory.
  3. On the Select Components page, unselect any components you do not want to install, and click Next.
    You cannot unselect the PowerBuilder Base Components option.
    Select or select the check boxes of individual components, or click Select All or Unselect All to change all the check boxes.
    The Demo Database is selected by default if you select the Tutorial component.
  4. On the Select Program Folder page, select the program folder to which program icons will be added, or specify a new one; then click Next.
  5. On the Start Copying Files page, review your settings, then click Next to begin installing files, or Back to change your selections.
  6. Install help:
    1. In the Help Library Manager, click Add next to PowerBuilder .NET, and then click Update.
      If you click Cancel, PowerBuilder .NET topics are not available in the IDE help.
    2. When prompted to confirm that you want to proceed, click Yes.
    3. When the Local Library completes the update, click Finish.
    4. Click Exit to close the Help Library Manager.
  7. On the InstallShield Wizard Complete page, click Finish to return to the common setup program.

PowerBuilder 12.6 is EOL

PowerBuilder 12.6 is end of life

To get the latest version of PowerBuilder, visit Appeon PowerBuilder Website 

Table 1: Software Products Tested with PowerBuilder
Software Type or Product Compatibility Description
Application servers PowerBuilder Classic has been tested with EAServer 6.3.1.
SQL Anywhere PowerBuilder 12.6 has been tested with SQL Anywhere 16.0.
PowerDesigner PowerBuilder 12.6 has been tested with PowerDesigner® 15.3 ESD #9.
Microsoft .NET Framework PowerBuilder .NET and PowerBuilder Classic are compatible with Microsoft .NET Framework 4.0 and 4.5.
Ghostscript The DataWindow Save As PDF feature has been tested with AFPL Ghostscript version 8.60.

Page 2 of 2

© 2024 Novalys. All Rights Reserved.