Bugs Fixed in DataFlex 23.0
Bugs Fixed & Improvements Implemented in DataFlex 23.0
In addition to major new features outlined in What's New in DataFlex 2023, the following bug fixes and improvements have been made to the product.
Language
-
Added support for multiline comments using:
/* comment goes here */. -
Include_Text allows .SQL and other text files to be included as constants with a single line of DataFlex code.
-
Optimized the Unicode logic of string functions. This should improve their speed dramatically. Affected functions: Left, Pos, Right, Mid, Insert, RightPos, Replace and Replaces.
-
Add new items to dynamic arrays using the
Move item to aArray[-1]notation:Procedure Example String[] Sentence Move "The" to Sentence[-1] Move "quick" to Sentence[-1] Move "brown" to Sentence[-1] Move "fox" to Sentence[-1] Move "jumps" to Sentence[-1] Move "..." to Sentence[-1] End_Procedure
Connectivity
Drivers
- Improved find logic for MySQL.
- Support
psConnectionAppNamein DB2 driver. - TimeOut option for closing database cursors. Find GT/LT cursors will be closed when the memory for the find cache is released.
- New attribute
DF_FIELD_SQL_COLUMN_NAME.
DF_FIELD_SQL_COLUMN_NAMEreturns the name of a column as it is defined in the SQL database. SQL column names can have special characters that are not allowed in DataFlex column names (for example: spaces, accented characters, or special characters like æ). To retrieve the exact name as defined in SQL, use theDF_FIELD_SQL_COLUMN_NAMEattribute. The returned value can be used to compose embedded SQL statements and with SQL filters. ChangedDataDict.pkgso the SQL Filter functions (SQLStrFileFieldName,SQLStrFieldName,SQLStrSchemaFileFieldName) now useDF_FIELD_SQL_COLUMN_NAMEinstead ofDF_FIELD_NAME. - Created
DF_DATABASE_ODBC_DRIVER_NAMEandDF_DRIVER_SQLSERVER_CLIENT_DRIVER_NAMEattributes to return the name of the underlying driver. - Fixed truncation of data when using
Get_Field_Value— it would truncate at 65535 in DF20.1 and in another case strip off the last byte. - Finds on indexes having NULL values not working correctly. The generated WHERE clause was not correct when there were NULL values in an index segment.
Set_Attribute DF_FILE_USE_DUMMY_ZERO_DATEcaused memory violation — fixed.- SQL drivers crashed after long error text from backend. There was a memory overwrite in error handling when the backend returned long error text (> 500) in all SQL drivers.
- Embedded SQL setting
SQLSTMTATTRIB_CURSOR_TYPEbroken in DF20.x. This was a 64-bit issue where the cursor would not change type when usingSend SQLSetStmtAttributeof hstmtSQLSTMTATTRIB_CURSOR_TYPE SQL_CURSOR_STATIC. - MSSQL driver restructure generates scalar variable error. Caused by script to find full-text index on a table; only happened when the server collation of the SQL Server instance was set to a case-sensitive collation.
- MySQL datetime columns returned as date. Restructuring a MySQL table with a DateTime column caused 'You have an error in your SQL syntax' due to a bug in MySQL ODBC driver (tested version 8.0.19) that returned
SQL_DATE (9)for adatetimecolumn instead ofSQL_TYPE_TIMESTAMP (93). - Restructure fails when replacing all columns. Copy records to temp table generates
INSERT INTO () SELECT FROM— when either list was empty, restructure would fail. DF_File_Changedincorrect for unchanged DateTime column. When moving a value in the field buffer that already contains that same value, theDF_FILE_CHANGEDattribute should not become true. ForDF_DateTimecolumns,DF_FILE_CHANGEDwas sometimes incorrectly set to true.- Studio table editor showed wrong size of DateTime columns. DateTime columns should always have a size of
23.3, but in the Studio, if a new DateTime column was added to a table it would show as23and after saving the table definition, it would show as26. Database Builder correctly showed the size as23.3. - MySQL/MariaDB: can't set identity when creating a table. MySQL/MariaDB does not allow AUTO_INCREMENT on decimal columns, only on integer columns. When a column was defined as
numeric(10,0), the ODBC driver would create a decimal(10,0)and setting it as AUTO_INCREMENT generated an error. - Fixed issue where a Find after
Fill_Field DF_LOW/DF_HIGHcould, in some circumstances, find the wrong record.
WebApp Framework
- Web column headers now have auto-wrapping to avoid adding
<br>tags, usingpbAllowHtml. - The cWebDynamicObjectContainer class did not implement
OwnerCancelClientAction, causing an error when doing a GridRefresh on acWebList/cWebGridcreated as a dynamic object — fixed. - Corrected shadow of
WebContextMenuin Df_Material. - The check symbol of the checkbox inside the header of the
cWebColumnSelectionIndicatordid not align nicely in Flat_Touch, Flat_Desktop and Material themes — fixed. - API change: fixed an issue in which
df.dom.removeListeneranddf.eventsAPIs were not requiring afListenerwhen detaching. If not provided, a warning is now thrown in the console log. cWebSuggestionFormandcWebTagsFormnumeric lookup did not find any items — fixed.cWebSuggestionFormandcWebTagsFormno longer have suggestions cut off.cWebTagsForm:- Fixed a caching issue when using
pbPaged. - Fixed an escaping issue when using
pbFullText. - WebColorPicker: When changing a color in the color map, the value of the
psValueproperty would not change — fixed. - WebContextMenu:
- Now works in FlexTron (LocalControlHost) environments.
- Has the ability to handle child objects as part of its scope (
pbChildScopes).- This means you can handle multiple objects with the same context. Previously you would have to create the same menu for each control.
- The added function
ContextScopereturns the object handle of the scope/control that the menu appeared for. pbChildScopesis not allowed forC_WebUIContextListHeadas it could modify the menu items.
- WebList: layout caches are now invalidated if the object name changes or if a new column is added/removed.
- WebMultiSelectList:
pbKeyboardSelectiondid not disable Ctrl/Shift clicks — fixed. - WebApp Server: support setting an application server to weight 0 in an SPLF environment to disable the node.
NamedValueAdd,NamedValueGet,NamedValueIndexandNamedValueRemoveused to be part of thecWebObjectclass, but are now global. This should have no impact on your code.- Dynamic object container mixed up the order of child objects (list columns) — fixed.
- Added a
NavigateInfofunction that allows developers to retrieve WebRegisterPath info at runtime. - General improvements to the Web Designer regarding the new Grid Layout.
- Improved keyboard selection behavior in the new
cWebMultiSelectList. - Improved the Studio to recognize
Include_Textstatements better in the Code Explorer. - Fixed
OnSyncWebAppmessage not being sent. OnReleaseProcessis sent after each HTTP request before the process is released. This allows you to perform maintenance tasks without influencing response time.- Added IsInViewStack to
cWebViewclass so developers can check if a view is in the view stack. OnRowClickincWebListnow provides the column index as a second parameter.- Fixed an issue in which
WebObjectByNamewould throw an error even thoughbOptNoErrorwas set. - Fixed named object handle in default code in
OnDropevent forcWebDragDropHelperobjects. - CSS issue:
cWebColumnCombonot properly aligned in Df_Material theme — fixed.
WebApp Administrator
- WebApp Administrator is now DPI aware.
- WebApp Administrator shows server version in Help > About dialog.
- Allow SPLF web servers to be added by their host name in addition to IP addresses.
Windows
- cWebView2Browser has been extended with a new
WebResourceRequestedAPI for intercepting and handling HTTP requests. - Added new Codejock CommandBars themes available in Codejock 22:
xtpThemeNativeWindows10xtpThemeWindows10DarkxtpThemeOffice2016AccessBlackxtpThemeVisualStudio2015BluextpThemeVisualStudio2017BluextpThemeVisualStudio2017BlueExtraxtpThemeVisualStudio2017DarkxtpThemeVisualStudio2017LightxtpThemeVisualStudio2019BluextpThemeVisualStudio2019BlueExtraxtpThemeVisualStudio2019DarkxtpThemeVisualStudio2019LightxtpThemeVisualStudio2022BluextpThemeVisualStudio2022BlueExtraxtpThemeVisualStudio2022DarkxtpThemeVisualStudio2022Light
Studio
- Fixed Studio crash after using the CodeSense scrollbar.
- Fixed Studio crash when code-complete list is open.
- Improved debugger performance with strings.
- “Open in Query Tester” menu item now works correctly. Previously, it would not allow use on specific parts of the SQL string or include quotes properly.
- While pasting foreign DataFlex code with strings in them, DataFlex keywords might get capitalized causing issues when pasting, for example,
functionJavaScript code (only in multiline strings) — fixed. - Allow for the EXE 64-bit suffix to be empty in the Studio configuration.
- Database Login dialog can better accommodate connection strings.
- Added keyboard shortcut Ctrl+Shift+G for Go To Definition in the Code Editor.
- Copy search results to clipboard now supports Unicode.
- Added
@SQLto CodeSense suggestions. - Improved the Studio to recognize
Include_Textstatements better in the Code Explorer. - Added tooltips to the buttons in Class Palette:

- Fixed bug causing Studio to generate registry keys for every file once opened.
- Fixed errors when using Ctrl+C to copy on Query Tester output grid.
- Improved DPI scaling of COM Classes list and Library Maintenance screens.
Runtime
- When
SortArraywas called with an array that had a missing element, a GPF occurred — fixed. Readlncommand would not read more than 65535 characters — fixed.
Compiler
You can now define/replace symbols from the Console Compiler.
-Radds/replaces symbols which can either be a symbol name or a definition. If a symbol is not defined in code, the symbol will be defined as1.
Examples:
-RPRODUCTION_BUILD
-RVERSION=1.0
- To define a string, the definition must be encapsulated in single or double quotes:
-RBUILD_NAME='My Build' -RBUILD_NAME="My Build"
Examples
- Added
cWebMultiSelectListsample. - Removed MAPI sample.
- Removed simple automation controller sample.
- Miscellaneous cleanups and updates.
- The example workspaces were restructured:
- Order Entry and Order Entry Tab were combined.
- Structured Specialized Components’ projects in subfolders.
- Moved Web Services Clients to Specialized Components.
TabbedOrder.srcnow includes new Codejock CommandBars themes available in Codejock 22.0.0.
Database Explorer
- When the "Keep selected fields" option is checked, clicking on a table in the tree will use the previously selected fields to rebuild the data view.
- Index tab page no longer shows
recnumas the first column of index 1 when not a recnum table. - Index grid on indexes tab-page was not read-only — fixed.
Database Builder
- ComboForm sizing in overlap boundaries dialog were wrong (controls overlapped each other) — fixed.
Registration
- Manual Activation: added ability to activate DataFlex licenses manually to support running DataFlex on PCs without internet access.
Various
- Updated old code in
seq_chnl.pkg(used bySeq_Channel_NewandSeq_Release_Channel) to use native arrays instead of obsolete Array objects. Load Defno longer defaults to table numbers in reserved areas.- Safeguarded the DeleteKey function in the
cRegistryclass to returnFalseif""is passed. - Creating new DataFlex tables allowed some invalid characters to be used, which would create issues with those tables later on (SQL conversion, creating DDs, etc.) — fixed.
- Passing a negative number to
pad()caused a GPF — fixed. - If a struct member matches the type name, it now uses the casing of the type.
Documentation
Welcome
- Tutorials main page: removed references to VisualDataFlex.com, added link to Learning Center.
- Tutorials: updated descriptions of some features to include Dark Mode information.
- Added an item to the DataFlex 23.0 Compatibility Notices that passing
[-1]as the array index for a dynamic array usingMovenow appends the item to the array. - Moved FlexTron from Welcome book to Developing Windows Applications.
Studio / Tools
- CodeSense: added info about SQL CodeSense.
- Added information about Properties Panel filters.
- Added Query Tester page.
- Database menu: added Query Tester.
- Tools menu: added Add JavaScript Engine, Import Studio Preferences.
- Tools > Configure Studio: added Query Tester configuration options to Database tab.
- Text menu: added GoTo > GoTo Definition, MultiLine Comment/Uncomment.
- Added index entries for Query Tester, SQL Query Tester, Struct Generator.
- Added Encryption settings for MSSQL Driver for Add/Edit a Connection dialog.
- Added
WebProperty,Obsoleteto index listing of Class Member Meta-Data tags. - Added
DesignerJSClassto index listing of Class Meta-Data tags. - Studio: added doc for Project Properties, General tab: Copy in JavaScript Engine.
- Studio: added doc for Project Properties, Compiler tab: Platform.
- Studio: added page for Database Toolbar.
- Studio: Configure Workspace > Workspace Preferences: added doc for Designer section.
Class Reference
- Web class structure changes for FlexTron implemented.
- Codejock renaming of classes in Codejock 22.0.0 implemented.
- Added "WebMenuContext Support" section to
cWebList,cWebTagsFormandcWebTreeView. - Reviewed and updated doc for
cDbScrollingContainer,cScrollingContainer. - Added doc for
pbDragDropEnabled. - Ensured doc is added for all instances of
piHeightandpiMinHeight. - Improved
OnCloseUpandCombo_Item_Changedhelp. - Updated
psMaskto state that the mask is used for display, but not while a control is in edit mode (except forpeDataType = typeASCII). - Added Registry location to
pbPreserveEnvironmentdoc. - Added doc for new
OnRowClickcolumn index parameter. - Added doc for
cWebViewBrowser. - Added doc for
sOptSameSiteparameter ofSetCookie. - Added note to
ErrorSystemclass: This class is obsolete. It has been replaced with thecWindowsErrorHandlerandcWebErrorHandlerclasses. - Added doc for
AddWebResourceRequestedFilterandOnWebResourceRequested. - All external links should now open in a new browser window.
- Added doc for
IsInViewStack. - Added note to
OnRowClick: Note that when pressing in acWebList,OnRowClickfires, butiColumnIndexwill be-1. In acWebGrid,iColumnIndexwill be correct, as this class is column aware. - Corrected
dtNumbertotypeNumberincWebModalDialogpages. - Added sample to
ComCreateGroup. - Updated
SQLColumnTypepage with type data. cWebGeoLocationdoc stated that it can be a drag-drop target. Since the class is non-visual, it can’t — corrected.cWebBreadcrumb: added information about Unicode characters in web properties.- Added note to
psSQLFilterto always surround SQL filters containing string constants with parentheses so they work correctly when combined with other filters (e.g. local and global filter strings).
Development Guide
- Added same note, with pertinent links, to all Web Property pages that all data types but RowId are supported.
- Added ODBC Driver 18 for SQL Server to:
- SQL Database Drivers Client Usage
- MSSQLDRV.INT page
- DataFlex SQL Server Driver
- Updated size of data area on compiler errors page.
- Improved links to download DataFlex 11.1 and 18.2 for migrations.
- Corrected
dtNumbertotypeNumberincWebModalDialogpages. - Added information about Unicode characters in Web properties.
- Developing Web Applications: added WebList Grouping topic.
Language Guide
- Updated Character Strings page with all types of multiline strings and examples.
- Added index entries for
@Strings,@SQLStrings. - Fixed link from Pointer Type page to Pointer command (it was linking to itself).
- Fixed first sample of aligned multiline strings.
- Added "Use HtmlEncode" to the HtmlEncode page.
- Added multi-line comments to Comment page.
Language Reference
- Added doc for Include_Text command; added pros and cons of
Include_Textvs.Include_Resourceto both commands. - Added same note, with pertinent links, to all Web Property pages that all data types but RowId are supported.
Roundnow returnsBigIntinstead ofInteger.CStringLengthstated that it returns code-units, but it actually returns code-points — corrected.- Added
Destroyto See Also list ofRefClass. Direct_Outputstated that “{ChannelNumber} may be 0 through 9, and if omitted, will be assumed to be 0 (default for input)”, which was copied fromDirect_Input. Corrected to “1 (default for output)”.- Clarified wording in
ConvertFromClientandConvertToClient(one was an exact copy of the other). RandomHexUUID: addedUsestatement to syntax (it requires a package).Relate: added note that existing data in parent buffers is not replaced with child buffer data.UCharArrayToWString: fixedWStringlinks that went toStringinstead.Deletecommand: added note thatRecnumandRowIdare cleared after a record is deleted.DF_Driver_Server_Name: updates to syntax, links and some corrections.- Added ODBC Driver 18 for SQL Server to:
DF_Driver_SQLServer_Client_VersionDF_Driver_Minimum_Client_Version- Added
NamedValueAdd,NamedValueGet,NamedValueIndex,NamedValueRemove. These used to be part of thecWebObjectclass, but are now global. Also updated links to these in all books. - Added notes about memory use and other differences between the two commands
Include_ResourceandInclude_Text. - Added tSQLColumnInfo page.
- Added doc for tWebColumnLayout.
- Added info for
aOptionsto tWebCell. - Added
DF_DATABASE_ODBC_DRIVER_NAME,DF_DRIVER_SQLSERVER_CLIENT_DRIVER_NAME. - A number of global functions still used the obsolete
Addresstype; these are now changed toPointer. - Renamed Global Variables page and section to "Predefined Global Variables" due to conflict with Global Variables page in Language Guide.
- Added doc for
DF_SQL_RELATION_COLUMN. - Added doc for
DF_FIELD_SQL_NAME. Read_Blocksample of reading a PDF file now opens file in BINARY mode.- Added sample of reading binary data to
direct_input. - Added note to
DF_FILE_SQL_FILTERto always surround SQL filters containing string constants with parentheses so they work correctly when combined with other filters (e.g. local and global filter strings).
Tutorials
- Added missing "Creating the Order Report (WinPrint)" page and adjusted "Adding Print Support to the Order View" to use this report.
- Fixed numerous other bugs reported by developers.
Miscellaneous
- Adjusted copyright notices product-wide to new standard:
- "Copyright 2005-2023 Data Access Corporation. All rights reserved."