What's New in DataFlex 2021
DataFlex 2021 - 20.0 (Released April 2022 - Build 20.0.7.156)
Introducing DataFlex 2021
DataFlex 2021 marks the beginning of a new era for DataFlex! While the main goal is to enable your applications to leverage both 64-bit and full Unicode support, there are revolutionary additions and improvements across all areas of the product.
Unicode and 64-Bit
DataFlex 2021 is 64-bit capable and fully Unicode, unlocking the power of 64-bit environments and supporting multiple languages in a single application. We recommend that you review the information in these sections:
...and then follow the step-by-step recommendations in Working with DataFlex 2021.
Note that Unicode support is available for all types of DataFlex Web Applications, including ASP Classic.
Web Framework
In addition to the multi-national support provided through the Unicode capabilities of DataFlex 2021, you can create mobile and web applications that are more secure, with enhanced user interaction that is more easily customizable, responsive, and dynamically configurable through these exciting additions and refinements in the Web Application Framework:
- Dynamic Web Objects are created at runtime, not hard-coded in the application. Their definitions may come from the database or prior user interactions, and their use is centered around UI objects (controls). Dynamic objects are useful for user-configurable dashboards, questionnaires, or anywhere you can't predetermine the exact object structure.
- The Web Order example has a dynamic objects demo.
- New cWebTagsForm - This new control looks like a standard web form, but it allows the selection of multiple items. These items are visually represented by boxes/balloons called tags. Selection is done by typing text into the form, and optionally, a list of items to select from is displayed.
- The cWebHTMLList class shows lists of data using custom HTML formats.
- The Web Order Mobile example uses this new class in the dashboard.
- The cWebGeoLocation class queries the current location (using GPS coordinates) by wrapping the HTML5 navigator.geolocation API and supports both single query and tracking.
- The Web Order Mobile example contains a GeoLocationAPI Demo.
- A new layer of security checks is added that validates if UI objects are actually displayed (
pbRender,pbVisible) and enabled (pbEnabled) before performing operations on them. This prevents unwanted exposure of data and prevents unallowed operations from being performed. A new web property type calledClientProtectedis added to support this. - See Enhanced Security in Web Framework Applications for complete details.
- Improved error handling on DownloadUrl.
- Improved masking logic with Android support.
- The
SetCookieprocedure now has support for thesamesiteattribute. The WebApp Framework has a new psSessionCookieSameSite property to configure this behavior, resolving thesamesitewarnings in Firefox. - The psInputMode property replaces
pbHtml5NumberOnMobileand is used to determine which keyboard is displayed on touch devices. This new attribute is a better fit for how the framework handles masking. ThepbHtml5NumberOnMobileproperty is removed and replaced with the new psInputMode property. - Improved
cWebProgressBarpbShowPercentagesupport in the Df_Material theme. - New OnCollapse & OnExpand events in cWebGroup.
- New OnKey event hook that is called for each key press in the form.
- New OnInput event hook that is called after every user change of the form value.
- New pbAutoTab support in cWebForm.
- UnSyncWebProperty for client web properties.
- The framework now fundamentally uses the cWebHttpHandler instead of
cWebService, which provides more flexibility in the JSON format and removes the need forvaluetree. - Additional client web properties of type number and date.
Special Note: Use The DataFlex Styler to easily customize the themes used in your Web Applications. Read more about Styling Web Applications.
Connectivity
The new connectivity capabilities are at the heart of providing robust Unicode support in your applications. DataFlex 2021 contains re-engineered SQL drivers for Microsoft SQL Server, IBM DB2, MySQL, and other back-ends supported through ODBC.
DataFlex 2021 also includes a 64-bit version of the PSQL (Btrieve) driver. This driver does not add any Unicode support and runs through the same compatibility layer as the Embedded Database driver. We continue to investigate the feasibility of adding Unicode support to the PSQL driver.
When working with various SQL back-ends, it's important to understand how each one deals with Unicode. The Working with DataFlex 2021 section covers Microsoft SQL Server in detail, but we've created a series of guides for other SQL environments:
- How to set up and test using Aurora
- How to set up and test using IBM DB2
- How to set up and test using MySQL
- How to set up and test using PostgreSQL
- How to set up and test using MariaDB
- How to set up and test using Oracle
As you convert your data and experiment with Unicode in your chosen SQL environment, pay attention to these important concepts:
- Database Drivers in DataFlex 2021
- Table Character Format in DataFlex 2021
- Padding and Trimming in SQL Databases
- The N Prefix in SQL
- Making Existing SQL Databases Unicode-capable
The updated drivers also reduce the default memory used in Web Applications. See "Memory Use in DataFlex Web Applications".
There are also many additional enhancements and fixes that create a more seamless SQL environment:
- Enhanced string manipulations are improved with the new NormalizeString function.
- Updated SQL Conversion Wizard to convert to Standard tables using ANSI/Unicode by default.
- Added a new embedded SQL Function SQLGetDataToUChar.
- Added N prefix to SQLStrLike function.
- Added SQLStrFileName function.
WebApp Server
DataFlex 2021 includes improvements to how web applications are managed that are not specific to the Unicode and 64-bit capabilities that are the main thrust of the new release.
- Maximum concurrent sessions limit per WebApp – developers can now set the “Maximum Concurrent Sessions” per web application instead of per server instance.

- Improved automatic re-load of process pools – in prior revisions, when the WebApp server automatically restarts an app, or the size of the process pool is changed, all processes in the pool are stopped and then restarted. In DataFlex 2021, the server will now stop each process one by one and start a new one until the entire pool is refreshed.
- Improved logic when a process is in an error state – In prior revisions, when a WebApp process is in an error state, the next incoming request is affected by this. When attaching to a process fails (which can have multiple reasons), an error is sent back to the client even though the cause of the error is usually unrelated to the request. In DataFlex 2021, when this happens, the server will assign the call to the next process in the pool (if available) to retry. Situations in which this can happen include unresponsive processes, connection lost, and attached state invalid. Note that this automatic assignment to the next available process can only be done if no DataFlex code of the application has been executed.
- Run WebApps under specific user accounts – developers can now specify which user account any web application should run under. See the screenshot of the updated WebApp properties panel above.
- Maximum processes per application server in SPLF configurations – in prior revisions, the process pool settings were configured at the SPLF server and then those were spread among the available application servers according to the weight ratio. If an application server was removed or failed, the processes would be redistributed over the remaining application servers without any consideration to the load (or licensing) on the remaining application servers. In DataFlex 2021, developers can now set a maximum pool size for each application server (slave) that will not be overridden by the pool settings at the web server (master).
- Fixed issue that disabling a web app in the administrator prompted for a restart.
- Enforce the maximum number of licensed web applications for Application Servers.
- Enforce the maximum number of licensed Application Servers for DataFlex Web (SPLF) Servers.
- Improved communication between Web Servers and Application Servers regarding updates on running & stopped processes.
Development Environment
Studio Dark Theme
We've added a Dark Theme to the DataFlex Studio!

You can try the new theme by selecting the Dark Theme option from the Configure Studio... option on the Tools menu.
Note that the Studio allows you to hot-switch between the Dark Theme and the standard theme, but we recommend you restart the Studio after changing between themes.
Compiler Warning System
The Compiler Warning System in the DataFlex 2021 Studio is more flexible and contains new warnings for the declaration and use of ambiguous functions. All warning categories can now be turned on and off with the CompilerLevelWarning command, which allows you to focus on various categories one at a time or in groups. This is especially useful when you want to focus on specific goals, like Unicode compatibility or cleaning up the use of ambiguous functions in your applications.
General Improvements
- New functions UCharArrayToWString and WStringToUCharArray.
- We have replaced SoftSentry (the product that handled evaluation periods and activation) with technology similar to the functionality we’ve used for years in DataFlex Reports.
- New folder selection dialog - The new cSelectFolderDialog class can be used to display a modern folder selection dialog in Windows applications.
- Added support for
pbVisibleto List and Grid columns. - Fixed CurrentDateTime expression not resulting in timespan issue.
- Improved documentation on Broadcast Recursive with return value.
- New OEM to ANSI wizard in database builder - see OEM Data in DataFlex and Table Character Format in DataFlex 2021 for more information.
- Added new 'Copy full file path' and 'Copy filename' options to the Studio.
- Raised RunProgram argument size limitations.
Examples
- Add sample for cSelectFolderDialog in Order Entry.
- Example workspaces use the latest DataFlex Reports 8 Example Library.