Skip to content

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 psConnectionAppName in 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_NAME returns 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 the DF_FIELD_SQL_COLUMN_NAME attribute. The returned value can be used to compose embedded SQL statements and with SQL filters. Changed DataDict.pkg so the SQL Filter functions (SQLStrFileFieldName, SQLStrFieldName, SQLStrSchemaFileFieldName) now use DF_FIELD_SQL_COLUMN_NAME instead of DF_FIELD_NAME.
  • Created DF_DATABASE_ODBC_DRIVER_NAME and DF_DRIVER_SQLSERVER_CLIENT_DRIVER_NAME attributes 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_DATE caused 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_TYPE broken in DF20.x. This was a 64-bit issue where the cursor would not change type when using Send SQLSetStmtAttribute of hstmt SQLSTMTATTRIB_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 a datetime column instead of SQL_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_Changed incorrect for unchanged DateTime column. When moving a value in the field buffer that already contains that same value, the DF_FILE_CHANGED attribute should not become true. For DF_DateTime columns, DF_FILE_CHANGED was 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 as 23 and after saving the table definition, it would show as 26. Database Builder correctly showed the size as 23.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_HIGH could, in some circumstances, find the wrong record.

WebApp Framework

  • Web column headers now have auto-wrapping to avoid adding <br> tags, using pbAllowHtml.
  • The cWebDynamicObjectContainer class did not implement OwnerCancelClientAction, causing an error when doing a GridRefresh on a cWebList / cWebGrid created as a dynamic object — fixed.
  • Corrected shadow of WebContextMenu in Df_Material.
  • The check symbol of the checkbox inside the header of the cWebColumnSelectionIndicator did not align nicely in Flat_Touch, Flat_Desktop and Material themes — fixed.
  • API change: fixed an issue in which df.dom.removeListener and df.events APIs were not requiring a fListener when detaching. If not provided, a warning is now thrown in the console log.
  • cWebSuggestionForm and cWebTagsForm numeric lookup did not find any items — fixed.
  • cWebSuggestionForm and cWebTagsForm no 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 psValue property 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 ContextScope returns the object handle of the scope/control that the menu appeared for.
    • pbChildScopes is not allowed for C_WebUIContextListHead as 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: pbKeyboardSelection did 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, NamedValueIndex and NamedValueRemove used to be part of the cWebObject class, 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 NavigateInfo function 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_Text statements better in the Code Explorer.
  • Fixed OnSyncWebApp message not being sent.
  • OnReleaseProcess is sent after each HTTP request before the process is released. This allows you to perform maintenance tasks without influencing response time.
  • Added IsInViewStack to cWebView class so developers can check if a view is in the view stack.
  • OnRowClick in cWebList now provides the column index as a second parameter.
  • Fixed an issue in which WebObjectByName would throw an error even though bOptNoError was set.
  • Fixed named object handle in default code in OnDrop event for cWebDragDropHelper objects.
  • CSS issue: cWebColumnCombo not 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 WebResourceRequested API for intercepting and handling HTTP requests.
  • Added new Codejock CommandBars themes available in Codejock 22:
  • xtpThemeNativeWindows10
  • xtpThemeWindows10Dark
  • xtpThemeOffice2016AccessBlack
  • xtpThemeVisualStudio2015Blue
  • xtpThemeVisualStudio2017Blue
  • xtpThemeVisualStudio2017BlueExtra
  • xtpThemeVisualStudio2017Dark
  • xtpThemeVisualStudio2017Light
  • xtpThemeVisualStudio2019Blue
  • xtpThemeVisualStudio2019BlueExtra
  • xtpThemeVisualStudio2019Dark
  • xtpThemeVisualStudio2019Light
  • xtpThemeVisualStudio2022Blue
  • xtpThemeVisualStudio2022BlueExtra
  • xtpThemeVisualStudio2022Dark
  • xtpThemeVisualStudio2022Light

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, function JavaScript 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 @SQL to CodeSense suggestions.
  • Improved the Studio to recognize Include_Text statements 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 SortArray was called with an array that had a missing element, a GPF occurred — fixed.
  • Readln command would not read more than 65535 characters — fixed.

Compiler

You can now define/replace symbols from the Console Compiler.

  • -R adds/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 as 1.

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 cWebMultiSelectList sample.
  • 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.src now 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 recnum as 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 by Seq_Channel_New and Seq_Release_Channel) to use native arrays instead of obsolete Array objects.
  • Load Def no longer defaults to table numbers in reserved areas.
  • Safeguarded the DeleteKey function in the cRegistry class to return False if "" 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 using Move now 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, Obsolete to index listing of Class Member Meta-Data tags.
  • Added DesignerJSClass to 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, cWebTagsForm and cWebTreeView.
  • Reviewed and updated doc for cDbScrollingContainer, cScrollingContainer.
  • Added doc for pbDragDropEnabled.
  • Ensured doc is added for all instances of piHeight and piMinHeight.
  • Improved OnCloseUp and Combo_Item_Changed help.
  • Updated psMask to state that the mask is used for display, but not while a control is in edit mode (except for peDataType = typeASCII).
  • Added Registry location to pbPreserveEnvironment doc.
  • Added doc for new OnRowClick column index parameter.
  • Added doc for cWebViewBrowser.
  • Added doc for sOptSameSite parameter of SetCookie.
  • Added note to ErrorSystem class: This class is obsolete. It has been replaced with the cWindowsErrorHandler and cWebErrorHandler classes.
  • Added doc for AddWebResourceRequestedFilter and OnWebResourceRequested.
  • All external links should now open in a new browser window.
  • Added doc for IsInViewStack.
  • Added note to OnRowClick: Note that when pressing in a cWebList, OnRowClick fires, but iColumnIndex will be -1. In a cWebGrid, iColumnIndex will be correct, as this class is column aware.
  • Corrected dtNumber to typeNumber in cWebModalDialog pages.
  • Added sample to ComCreateGroup.
  • Updated SQLColumnType page with type data.
  • cWebGeoLocation doc 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 psSQLFilter to 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 dtNumber to typeNumber in cWebModalDialog pages.
  • 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, @SQL Strings.
  • 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_Text vs. Include_Resource to both commands.
  • Added same note, with pertinent links, to all Web Property pages that all data types but RowId are supported.
  • Round now returns BigInt instead of Integer.
  • CStringLength stated that it returns code-units, but it actually returns code-points — corrected.
  • Added Destroy to See Also list of RefClass.
  • Direct_Output stated that “{ChannelNumber} may be 0 through 9, and if omitted, will be assumed to be 0 (default for input)”, which was copied from Direct_Input. Corrected to “1 (default for output)”.
  • Clarified wording in ConvertFromClient and ConvertToClient (one was an exact copy of the other).
  • RandomHexUUID: added Use statement to syntax (it requires a package).
  • Relate: added note that existing data in parent buffers is not replaced with child buffer data.
  • UCharArrayToWString: fixed WString links that went to String instead.
  • Delete command: added note that Recnum and RowId are 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_Version
  • DF_Driver_Minimum_Client_Version
  • Added NamedValueAdd, NamedValueGet, NamedValueIndex, NamedValueRemove. These used to be part of the cWebObject class, 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_Resource and Include_Text.
  • Added tSQLColumnInfo page.
  • Added doc for tWebColumnLayout.
  • Added info for aOptions to tWebCell.
  • Added DF_DATABASE_ODBC_DRIVER_NAME, DF_DRIVER_SQLSERVER_CLIENT_DRIVER_NAME.
  • A number of global functions still used the obsolete Address type; these are now changed to Pointer.
  • 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_Block sample 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_FILTER to 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."

See Also