What's New in DataFlex 2023

DataFlex 2023 introduces FlexTron, which brings Web views and controls into Windows applications, allowing a more modern look and feel or just adding Web features to more mature Windows applications. DataFlex 2023 provides better tools for working with SQL with a New Embedded SQL API, including new classes, named parameter support, @SQL string with syntax highlighting and a SQL Query Tester in the Studio.

Watch the What’s New in DataFlex 2023 Learning Center course.

 

Changes Between the Final and previous versions in the DataFlex 2023 release cycle

This page lists all new features in DataFlex 2023.

See DataFlex 2023 Update 1 Release Changes for the specific list of changes in DataFlex 2023 between the Final Release and Update 1.

See DataFlex 2023 Final Release Changes for the specific list of changes in DataFlex 2023 between Release Candidate 1 and the Final Release.

See Bugs Fixed in DataFlex 23.0 for bugs fixed and improvements implemented in DataFlex 2023.

 

Installers

 

Compatibility Notices

 

Migration

The only change the migration wizard makes to workspaces already in versions 20.0 (and later) is to update the SWS file.

Workspaces currently in versions prior to 20.0 will have their filelist inspected for any OEM tables and their projects’ CFG files adjusted to accommodate compiling in 64 bits. Those workspaces may be adjusted further depending on the version of DataFlex the workspace is actually coming from.

 

New Features

FlexTron

DataFlex 2023 introduces FlexTron, which brings Web views and controls into Windows applications, allowing a more modern look and feel or just adding Web features to more mature Windows applications.

You can use a single Web control or build entire applications.

The following classes provide support for this:

We added a FlexTron sample workspace for you to see FlexTron in action and easily try it out.

A new project template is available for creating FlexTron Applications. When using this template, the Studio will also support creating / adding web views.

Toggle the Class Palette between windows and web classes using the toggle button in its toolbar or the context menu.

Read more about FlexTron.

 

New Embedded SQL API

DataFlex 2023 comes with a new way to work directly with SQL statements. A new engine for executing statements is built into the runtime that puts result sets directly into native DataFlex types. This means that your results can now go directly into structs, multidimensional arrays and variants with the proper type conversions being done automatically. Parameterized queries now support named parameters and only a single class / object is needed for executing queries. Studio support for working with SQL statements is improved by adding syntax highlighting, code sense and a query test tool for SQL statements.

@SQL String with syntax highlighting

SQL CodeSense

The Studio will now help write SQL queries by supplying CodeSense in your SQL statements. It will do this when using @SQL strings in the language or when editing .sql files with the Query Tester.

cSQLExecutor class

 

Include_Text

Include_Text allows .SQL and other text files to be included as constants with a single line of DataFlex code.

 

Read more about the New Embedded SQL API.

 

Query Tester

A Query Tester has been added to the Studio. It helps you create, test and execute SQL queries and has a Struct Generator.

Read more about the Query Tester.

 

Web Grid Layout

The grid layout is a new layout system now available for web applications. It provides more control over the vertical positioning of your controls. It is based on the CSS grid layout.

To use this new layout type, change the peLayoutType property to ltGrid on any container (cWebView, cWebPanel, cWebGroup, cWebTabContainer, ..). The piRowCount and psRowHeights properties allow you to configure a grid to which controls can be snapped. Note that the Studio's WebApp Designer will help you with this.

By default, the peLayoutType property value is inherited from parent containers, but the flow layout and the grid layout can be mixed within applications and views.

 

WebList Grouping

The cWebList class now supports grouping of data. When enabled, the user can configure the groups via the context menu on the header of the list.

To enable grouping, the WebList must be set to load all data to the client (peDbGridType=gtAllData and peDbGridType <> gtManual) and then peGrouping can be set to grpAutomatic. By default, configured groups are stored in local storage so they can be restored after a page reload. This behavior can be configured and customized using properties and events.

The automatic grouping happens on the client in JavaScript. Manual grouping can also be performed by setting peGrouping to grpManual. When this is done, groups can be created from OnManualLoadData by filling in the aGroups and aGroupHeaders arrays.

The WebOrder and WebOrderMobile sample workspaces contain grouping samples under the Demo menu.

 

Improvements

Language

Aligned Multiline Strings

When embedding foreign code like SQL, JavaScript or HTML into DataFlex code, you can use a multiline string. A new style of multiline string has been added that allows better alignment with the rest of your code without adding all this white space to the actual string at runtime. These strings use the triple quote notation and have the advantage that you can embed quotes in your source code.

Get SQLExecDirect of ghoSQLExecutor @SQL"""

    SELECT

        Phone_Number

    FROM

        Customer

    WHERE

        Customer_Number = 33

    """ to aResult

 

Move """

    function hello(sName){

        window.alert("Hello: " + sName);

    }

    hello("world");

    """ to sJavaScript

 

Multi-Line Comments

/* Multi-Line comments

have been added

to the DataFlex language. :-) */

See Comments for details.

 

Studio

Web Property Categories

Web properties are now identified in the Properties Panel with a Unicode Earth character.

Due to this, Web Properties are no longer listed in a separate Web Properties category, but in meaningful categories like Appearance and Behavior, along with standard (non-Web) properties.

 

Properties Panel Filters

The Studio's Properties Panel now allows for filtering of properties.

You can choose whether to show All properties, Standard (non-Web) properties or Web properties.

In addition, you can choose to see only changed properties along with the property type filter above.

 

Automatic Theme Change based on System Settings

The Studio can now change from Light to Dark Theme when Windows does, rather than having to manually toggle the Studio theme.

 

Option to Copy JavaScript Engine

A new option has been added to Project Properties that allow JavaScript Engine to be automatically checked and updated.

 

Import Studio Preferences

You can now import preferences from a prior Studio version on demand from the Tools menu.

 

Studio Icons

The icons now contain larger sizes for high DPI screens. This especially shows when running the studio at 200% or higher.


 

Web Framework

 

Multiple Row Selection in WebLists

Added cWebMultiSelectList, cWebColumnSelectionIndicator classes for selecting multiple rows.

 

Tags in Web Lists and Grids.

Added cWebColumnsTags class.

 

Customizable Context Menu for the WebList

The context menu available on the header of cWebLists and cWebGrids can now be customized. This can be done by overriding / augmenting OnCreateDefaultHeaderMenu or by setting pbUseCustomerHeaderMenu and adding a context menu inside the WebList object. A new context C_WebUIContextListHead is available in the cWebContextMenu to address the header of the WebList.

 

WebApp Server

Improved Crash Logging

WebApp crashes are now logged to the Windows Event viewer with a full stack trace if possible.

 

Faster WebApp Startup Times

Faster startup times due to improved web property logic.

 

Connectivity

As of DataFlex 23.0, we support Microsoft SQL Server 2022 and encourage developers to test their SQL programs using SQL Server 2022.

Support for ODBC Driver 18 for SQL Server

As of DataFlex 23.0, we support ODBC Driver 18 for SQL Server.

The DataFlex SQL Server Driver (MSSQLDRV) 23.0 will now recognize and support ODBC Driver 18 for SQL Server.

ODBC Driver 18 for SQL Server has a breaking change, where the default value of the "Encrypt" connection option changed from optional/no to mandatory/yes.

When migrating from ODBC Driver 17 for SQL Server or earlier, the changed default encryption error may result in the following error:

[Microsoft][ODBC Driver 18 for SQL Server] SSL Provider: The certificate chain was issued by an authority that is not trusted.

The SQL Connection Manager in DataFlex 2023 Studio now has encryption settings that can be set to send data encrypted and/or check certificates.

 

Codejock Version Update

DataFlex 2023 uses the 22.0.0 release of Codejock (both COM and MFC) and all the related components have been updated.

Note: Codejock renamed its Grid control classes from Reportxxx to Gridxxx, which, once imported from the Codejock ActiveX control and "wrapped" to be used with DataFlex, to some classes (including class members and constants) having their names changed from cCJReportxxx to cCJGridxxx. For example, the class cCJReportBehavior is now named cCJGridBehavior.

We have tried to make this transition as seamless and painless as possible, to ensure that your DataFlex applications compile and work as before.

We changed all of the names in our internal classes (most importantly cCJGridControl.pkg). DataFlex Codejock classes that are wrapped, and have additional DataFlex code to improve how DataFlex uses that class mostly already used the Gridxxx naming convention (e.g. cCJGrid, cDbCJGrid, cDbCJGridColumn, etc.). If your code only use these classes, you will be able to compile your applications without any code adjustments.

If your code uses DataFlex Codejock classes that are wrapped, but referenced code using the old Reportxxx naming convention, you may get compiler errors. To resolve these, you can either:

 

 

See Also

FlexTron

New Embedded SQL API

Query Tester

What's New