Skip to content

DataFlex SQL Drivers 6.2 Build Notes

Of special note

This document contains information about the 6.2 version of the DataFlex SQL drivers.

Build 6.2.0.40

MSSQLDRV

A date or datetime column with a default value getdate() would not be filled with the current datetime on save of a new record. MSSQLDRV will now use the OUTPUT clause to retrieve the current datetime after saving a new record.

DB2_DRV and ODBC_DRV

A date or datetime column with a default value CURRENT_TIMESTAMP would not be filled with the current datetime on save of a new record. The default value to generate a timestamp can vary per database.

  • DB2_DRV will recognize CURRENT_TIMESTAMP and CURRENT TIMESTAMP.
  • ODBC_DRV will recognize:
  • CURRENT_TIMESTAMP (ANSI standard, Oracle)
  • CURRENT_DATE (PostgreSQL)
  • NOW() (PostgreSQL, MySQL)
  • DATE() (MySQL)

Build 6.2.0.39

All DataFlex SQL Drivers

  • Set_attribute DF_INDEX_NAME for a temporary index caused an exception.
  • Changed cli.pkgDF_INDEX_TEMPORARY had the wrong value.

Build 6.2.0.38

MSSQLDRV

In some very rare situations a system table can unintentionally end up with more than one record. On SQL Server this would generate a hard-to-track error: “Connection is busy with results for another command”.

Made a change that prevents the connection-busy error. Instead, a “System Table has more than one record.” error will be generated on open.

Build 6.2.0.37

All DataFlex SQL Drivers

Changed naming in driver DLL properties:

  • mssqldrv.dll — DataFlex SQL Server Driver
  • db2_drv.dll — DataFlex DB2 Driver
  • odbc_drv.dll — DataFlex ODBC Driver

Build 6.2.0.36

MSSQLDRV

When using GUID (uniqueidentifier) columns with default value newid() or newsequentialid(), the OUTPUT clause is used to return generated GUID values into the buffer.

When the table also has a trigger defined, this caused an error about invalid use of the OUTPUT clause.

Changed to use OUTPUT INTO clause.

Build 6.2.0.35

All DataFlex SQL Drivers

Updated Studio driver configuration files:

  • ODBC_DRV_DriverDef.xml
  • df_index_sql_primary_key and df_index_clustered were missing.
  • Changed all attribute names to lowercase for better display in the properties panel.
  • Changed description of df_field_default_value (square bracket use).

  • MSSQLDRV_DriverDef.xml

  • Changed description of df_field_default_value (square bracket use).

  • DB2_DRV_DriverDef.xml

  • Added df_file_identity_cache_size attribute.
  • Changed description of df_field_default_value (square bracket use).

DB2_DRV

Do not write out IDENTITY_CACHE_SIZE to INT file if the value is 0 or 1 (NO_CACHE).

Build 6.2.0.34

All DataFlex SQL Drivers

Changed index creation order during restructure/conversion: Primary Key indexes will always be created first.

This fixes a problem in DB2 where, in specific situations (non-clustered index, PK name not alphabetically first), an incorrect index would be used for the primary key.

Also improved context information in Open errors. Added Table= and Source= context.

DB2_DRV

When (re-)creating a primary key during restructure, the callback (output panel in Studio) would sometimes incorrectly report "Failed to create primary key." Fixed.

Build 6.2.0.33

DB2_DRV

Calling a DB2 stored procedure with a CLOB argument: when the length of the passed parameter in SQLSetArgument was larger than 16K, the parameter would be truncated to 16K. Now fixed to pass any length, provided the argument_size is large enough.

Build 6.2.0.32

All CLI Drivers

Changed some error texts for open errors.

Build 6.2.0.31

All CLI Drivers

Open of a system table in Database Explorer 19.0 raised "Index number out of range" error. Caused by Get_attribute DF_INDEX_NAME of a system table raising "Index number out of range" error. Changed to not generate an error but return an empty string for DF_INDEX_NAME.

Build 6.2.0.30

All CLI Drivers

When setting or getting a SQL filter no OEM/ANSI conversion was done. This caused SQL filters not to work properly with accented characters. Changed set_attribute/get_attribute DF_FILE_SQL_FILTER to perform OEM/ANSI conversion when table_character_format is ANSI.

MSSQLDRV

Added SQL Server client name in error text on minimum client version.

Build 6.2.0.29

All CLI Drivers

  • Changed cli.pkg. Added constants for missing CLI error codes (CLIERR_...).
  • Added version check for minimum database client version for DB2_DRV and ODBC_DRV. (This was already added for MSSQLDRV in build 6.2.0.28.)

New driver configuration file (mssqldrv.int, db2_drv.int, odbc_drv.int) keyword:

MINIMUM_CLIENT_VERSION

New attribute:

DF_DRIVER_MINIMUM_CLIENT_VERSION

For DB2_DRV and ODBC_DRV the default value for minimum client version is 0. For MSSQLDRV see notes in build 6.2.0.28.

DB2_DRV

Made a change to enable DSN-less connections for DB2.

All CLI Drivers

Changed driver configuration files (mssqldrv.int, db2_drv.int, odbc_drv.int). Added new settings for 6.2 drivers:

Minimum_Client_Version
Login_On_Open
Allowed_Structure_Changes

Build 6.2.0.28

All CLI Connectivity Kits

All searches for connectstring keywords (like SERVER, DSN) made case insensitive.

MSSQLDRV

Added version check for minimum database client version.

New driver configuration file (mssqldrv.int) keyword:

MINIMUM_CLIENT_VERSION

New attribute:

DF_DRIVER_MINIMUM_CLIENT_VERSION

For SQL Server the minimum client version can be set to:

8  SQL Server (SQL Server 2000 client)
9  SQL Native Client (SQL Server 2005 client)
10 SQL Server Native Client 10.0 (SQL Server 2008 client)
11 SQL Server Native Client 11.0 (SQL Server 2012 client)
12 ODBC Driver 11 for SQL Server (SQL Server 2014 client)
13 ODBC Driver 13 for SQL Server (SQL Server 2016 client)

The default value for minimum client version is 10 (SQL Server Native Client 10.0 — SQL Server 2008 client).

The version check is performed during login. Note the first open in a program may also do a login.

Notes: - In general it is best to use matching client and server versions. For this the match_client_server setting can be used. - Using older clients with newer server versions may sometimes cause unpredictable results. - A known issue is when using SQL Server date type. This type was introduced in SQL Server 2008 and is not recognized by older clients. An older client will return SQL date as string (df_ascii), which can cause incorrect date values in the database.

Changed cli.pkg: - Added DF_DRIVER_MINIMUM_CLIENT_VERSION attribute.

Changed error file dferr003.dat: - Added: - 12344 Structure change not allowed - 12345 Minimum database client not found

Changed mssqldrv.pkg: - Added function:

Function SqlServerClientVersionName Integer iClientVersion Returns String

ODBC_DRV

Changed ODBC_DRV_DriverDef.xml: new attributes for DataFlex 19.0 / Connectivity Kit 6.2 added to odbc_drv_driverdef.xml:

  • df_file_restructure
  • df_file_restructure_int_only
  • df_file_allowed_structure_changes
  • df_index_sql_type
  • df_index_number

These attributes were already added in mssqldrv_driverdef.xml and db2_drv_driverdef.xml.

Build 6.2.0.27

Internal build.

Build 6.2.0.26

DB2_DRV and ODBC_DRV

Enumeration of tables with function EnumerateTables would not list all tables when one or more tables with comments longer than 128 characters were found. Fixed.

Build 6.2.0.25

  • Reference to index.0 was not written to the INT file in case of an index-only restructure (a restructure that only involves creating/dropping of indexes).
  • If no SERVER_NAME was present in the INT file, it would cause an exception. The Connectivity Kit will now raise an appropriate error.

Build 6.2.0.24

  • cli.pkg — Removed double ifdef.
  • After a failed login with an invalid connection id, a connection handle was not released. Fixed.

Build 6.2.0.22

MSSQLDRV

  • Added constants for “ODBC Driver 11 for SQL Server” (Client for SQL Server 2014) and “ODBC Driver 13 for SQL Server” (Client for SQL Server 2016) in mssqldrv.pkg.
  • Added new function EnumerateServersLocal. This function returns all SQL Server instances on the local machine. The existing function EnumerateServers has not changed and still returns all SQL Server instances on the network. Note this function sometimes takes a long time.

Build 6.2.0.20 (includes merge from build 6.1.0.32)

MSSQLDRV

Added support for “ODBC Driver 11 for SQL Server” (SQL Server 2014 client) and “ODBC Driver 13 for SQL Server” (SQL Server 2016 client). The MSSQLDRV connectivity kit will now recognize the following clients. The highest installed client version on a workstation will be used:

#define SQLSERVER2000CLIENT    8   /* "SQL Server" */
#define SQLSERVER2005CLIENT    9   /* "SQL Native Client" */
#define SQLSERVER2008CLIENT   10   /* "SQL Server Native Client 10.0" */
#define SQLSERVER2012CLIENT   11   /* "SQL Server Native Client 11.0" */
#define SQLSERVER2014CLIENT   12   /* "ODBC Driver 11 for SQL Server" */
#define SQLSERVER2016CLIENT   13   /* "ODBC Driver 13 for SQL Server" */

All CLI Connectivity Kits

  • Bug in RedirectIdConnectString caused a memory error in logout.
  • Setting a constraint with accented characters did no OEM/ANSI translation.

MSSQLDRV (continued)

Changed default map schema for SQL Server (DEFAULT_MAP_DF_TO_SQL_TYPE_SCHEMA) to MAP_DF_TO_SQL_TYPE_SQL2012.

The map schema controls which SQL type will be used when creating new columns. The previous default was MAP_DF_TO_SQL_TYPE_SQL2000; it is now MAP_DF_TO_SQL_TYPE_SQL2012.

Notes: - These type mappings only apply when adding/creating new columns. Existing columns keep their existing type. - These mappings apply when converting from embedded database to SQL Server, since this is effectively creating new columns. - Versions before build 6.2.0.20 used SQL200 mappings by default. Build 6.2.0.20 and later use SQL2012 mappings by default. - The SQL Server 2012 map schema can also be used for SQL Server 2014 and SQL Server 2016.

Changed mssqldrv.int to reflect the new defaults.

Build 6.2.0.19 (includes merge from build 6.1.0.31)

  • A masked time value of 00:00:00 would be passed as " : : ", causing a “Time contains an invalid value” error. This will now be handled as time value 00:00:00.

Restructure prevention changes: - Implemented a new table-level attribute DF_FILE_ALLOWED_STRUCTURE_CHANGES. This can be set to:

ALL_TABLE_CHANGES_ALLOWED
ONLY_TABLE_INT_FILE_CHANGES_ALLOWED
NO_TABLE_CHANGES_ALLOWED

All Set_Attribute calls of DF_FILE_*, DF_FIELD_* and DF_INDEX_* attributes will check against DF_FILE_ALLOWED_STRUCTURE_CHANGES and raise an error if a change is not allowed.

Changing properties of a table may result in changes in the INT file only (client-side changes) or changes on the server (server-side changes). In some situations it may be desirable to allow only client-side changes. In that case set the attribute to ONLY_TABLE_INT_FILE_CHANGES_ALLOWED to protect against server-side changes.

Example:

Set_Attribute DF_FILE_ALLOWED_STRUCTURE_CHANGES of hTable iField to ONLY_TABLE_INT_FILE_CHANGES_ALLOWED
Structure_Start hTable "MSSQLDRV"
Set_Attribute DF_FIELD_LENGTH of hTable iField to iNewLength
Structure_End hTable DF_STRUCTEND_OPT_NONE

Build 6.2.0.18

  • Added new DF_DRIVER_CONFORMANCE level bit. DF_DRIVER_CONFORMANCE now indicates the following features:
  • bit 1 — Driver supports rowid
  • bit 2 — Driver supports datetime type
  • bit 3 — Driver supports DD SQL filters (build 6.0.0.22)
  • bit 4 — Driver supports handled connections (build 6.2.0.18)

Restructure prevention changes: - Implemented a new setting ALLOWED_STRUCTURE_CHANGES. This can be set to:

ALL_TABLE_CHANGES_ALLOWED
ONLY_TABLE_INT_FILE_CHANGES_ALLOWED
NO_TABLE_CHANGES_ALLOWED

ALLOWED_STRUCTURE_CHANGES can be configured in the driver configuration files (mssqldrv.int, db2_drv.int, odbc_drv.int).

All Set_Attribute calls of DF_FILE_*, DF_FIELD_* and DF_INDEX_* attributes will check against ALLOWED_STRUCTURE_CHANGES and raise an error if a change is not allowed.

Build 6.2.0.17

If an error occurs during open, the driver will now return error 75 DFERR_CANT_OPEN_DATA_FILE. This makes any error during open a critical error that will abort the program. The original error with the reason for the error will be returned in the additional error text.

Build 6.2.0.16

  • Bugfix: setting the value of a SQL_TIME column could cause memory overwrite. This was a side effect of an earlier fix in 6.2.0.13.
  • RedirectIdConnectString and RedirectIdConnectStringKeepLoggedIn now combined into a single function with a bKeepLoggedIn parameter.

New RedirectIdConnectString function (defined in cCliHandler class in cli.pkg):

Function RedirectIdConnectString String sConnectionId String sConnectString Boolean bKeepLoggedIn Returns Integer

Description: - Redirect a connection of a connection ID. - sConnectionId must contain a valid ConnectionId (e.g. "DFCONNID=MyID"). - sConnectString must contain a valid connect string (e.g. "SERVER=MyServer;DATABASE=MyDatabase;UID=MyName;PWD=MyPassword"). - RedirectIdConnectString will redirect from the old connection (Server/Database the connectionId currently points to) to the new connection (Server/Database specified in sConnectString). - All opened tables will be moved from old connection to new connection (tables must have identical structure in both connections). - If bKeepLoggedIn = false, the new connection will be logged in and the old connection will be logged out on each redirect. - If bKeepLoggedIn = true, connections will remain open and be reused on the next redirect. - Returns: - 0 — redirection successful - 1 — the connection ID does not exist or cannot be found - 2 — login into the new connection failed

Example:

// We use the following connectionId:
//     MssqlOrderID=SERVER=(local);DATABASE=MssqlOrder190;Trusted_Connection=yes
String sConnectionId
String sConnectString
Open SalesP
Move "DFCONNID=MssqlOrderID" to sConnectionId
Move "SERVER=(local);DATABASE=MssqlOrder182;Trusted_connection=yes" to sConnectString
Set psDriverID of oCliHandler to "MSSQLDRV"
Move True to bKeepLoggedIn
Get RedirectIdConnectString of oCliHandler sConnectionId sConnectString bKeepLoggedIn to iRetval

Notes on RedirectIdConnectString: - Can switch between different databases on different servers. - Tables must have identical structures in both databases; differences in structures will give unpredictable results. - If bKeepLoggedIn = false: switching the database involves login to the new connection and logout from the old connection on every redirect. - If bKeepLoggedIn = true: connections remain open and will be reused on next redirect.

Build 6.2.0.15

Amended version of RedirectIdConnectString function. Syntax and functionality are the same.

Difference: - RedirectIdConnectString will log out of old connection and log in to the new connection on every redirect. - RedirectIdConnectStringKeepLoggedIn will not logout/login on redirect but keep connections open.

Build 6.2.0.14

New attribute DF_DATABASE_DEFAULT_DATABASE

This attribute returns or changes the default database of a database connection.

The default database is the database where the connectivity kit sends its SQL commands. It can be compared to changing the USE database in SQL scripts. The default database is initially set to the database specified in the connect string.

Example connection string:

MssqlOrderID=SERVER=(local); DATABASE=MssqlOrder190;Trusted_Connection=yes

If logged in with this connection id the default database will be MssqlOrder190.

Example function to get the default database:

Function GetDefaultDatabase Returns String
    Integer iDriverIndex
    Handle hConnectionHandle
    String sDefaultDatabase
    Get LoadedDriverIndex of ghoConnection "MSSQLDRV" to iDriverIndex
    If (iDriverIndex) Begin
        Get CLIConnectionHandle iDriverIndex "DFCONNID=MssqlOrderID" to hConnectionHandle
        If (hConnectionHandle) Begin
            Get_Attribute DF_DATABASE_DEFAULT_DATABASE of iDriverIndex hConnectionHandle to sDefaultDatabase
            //Showln (SFormat("DF_DATABASE_DEFAULT_DATABASE = %1", sValue))
        End
    End
    Function_Return sDefaultDatabase
End_Function

Function to change the default database:

Procedure SetDefaultDatabase String sDatabaseName
    Integer iDriverIndex
    Handle  hConnectionHandle
    Get LoadedDriverIndex of ghoConnection "MSSQLDRV" to iDriverIndex
    If (iDriverIndex) Begin
        Get CLIConnectionHandle iDriverIndex "DFCONNID=MssqlOrderID" to hConnectionHandle
        If (hConnectionHandle) Begin
            Set_Attribute DF_DATABASE_DEFAULT_DATABASE of iDriverIndex hConnectionHandle to sDatabaseName
        End
    End
End_Procedure

Changing the default database can be used in multi-tenant applications where multiple databases with identical structures are used. When changing the default database, opened tables remain open; after the database change the opened tables will point to a different database. It is expected that tables in both databases have identical structures.

Example usage:

// Let's assume this returns MssqlOrder190
Get GetDefaultDatabase to sOldDefaultDatabase
// Open table SalesP in database MssqlOrder190
Open SalesP
// Find a record in table SalesP in database MssqlOrder190
Clear SalesP
Move "MM" to SalesP.Id
Find Eq SalesP by Index.1
// Switch to a different database
Send SetDefaultDatabase "MssqlOrder182"
// Table SalesP is still open, now points to database MssqlOrder182
// Find will now find a record in table SalesP in database MssqlOrder182
Clear SalesP
Move "MM" to SalesP.Id
Find Eq SalesP by Index.1

Notes on DF_DATABASE_DEFAULT_DATABASE: - Can only switch between databases on the same server. - Databases will be accessed with the same credentials. - Tables must have identical structures in both databases; differences in structures will give unpredictable results.

New RedirectIdConnectString function

This function can be used to redirect connections when using connection ids. Use this instead of RedirectConnection when using connection ids. Defined in cCliHandler class in cli.pkg. Useful for switching between identical databases in multi-tenant situations.

Example:

// We use the following connectionId:
//     MssqlOrderID=SERVER=(local);DATABASE=MssqlOrder190;Trusted_Connection=yes
String sConnectionId
String sConnectString
Move "DFCONNID=MssqlOrderID" to sConnectionId
Move "SERVER=(local);DATABASE=MssqlOrder182;Trusted_connection=yes" to sConnectString
Set psDriverID of oCliHandler to "MSSQLDRV"
Get RedirectIdConnectString of oCliHandler sConnectionId sConnectString to iRetval

This will switch from MssqlOrder190 to MssqlOrder182.

Notes on RedirectIdConnectString: - Can switch between different databases on different servers. - Switching the database will involve login to the new connection and logout from the old connection. - Tables must have identical structures in both databases; differences in structures will give unpredictable results.

MSSQLDRV

Conversion to SQL Server: When date columns allow nulls (Default_Nullable_Date setting in mssqldrv.int) and no dummy zero dates are used (Default_Use_Dummy_Zero_Date in mssqldrv.int), the conversion will now save zero dates as NULL in SQL Server.

Build 6.2.0.13 (includes merge from build 6.1.0.30)

  • Setting the DD value of a text column (for example using Set Field_Changed_Value) could cause a memory error if:
  • The sText value was the same as the value already in Customer.Comments.
  • An ANSI/OEM conversion was done.
  • Moving data to a df_ascii / sql_varchar column, where the data was larger than the field length, could cause a memory error. Fixed.

Build 6.2.0.12

Added new embedded SQL function SQLConnectionConnect:

Function SQLConnectionConnect String sDrvrID String sConnectString Returns Integer

SQLConnectionConnect establishes an embedded SQL connection that uses an existing connection from an earlier login or open. Existing connections are identified by their connect string (can be obtained with DF_DRIVER_SERVER_NAME attribute). If sConnectString exists in the list of existing connections, that connection will be used for embedded SQL.

  • sConnectString must be an exact match, but can be case insensitive.
  • sConnectString can contain a connection id (for example: "DFCONNID=MyConnectionID").
  • If no matching connect string is found, this function will return 0.
  • This function only works with CLI connectivity kits 6.2 or later.

Example:

Procedure TestSQLConnectionConnect
    String sConnectString
    String sDriverId
    String[][] aResultSet
    Handle hdbc
    Handle hstmt
    String  sSQLQuery

    Move "SERVER=(local);DATABASE=MssqlOrder190;Trusted_Connection=yes" to sConnectString
    Move "MSSQLDRV" to sDriverId

    // Login to a connection
    Login sConnectString "" "" sDriverId

    // Use the connection for embedded SQL
    Get SQLConnectionConnect of oSQLHandler sDriverId sConnectString to hdbc
    If (hdbc <> 0) Begin
        Get SQLOpen of hdbc to hstmt
        If (hstmt <> 0) Begin
            Move "Select * from SalesP" to sSQLQuery
            Send SQLExecDirect of hstmt sSQLQuery
            Get SQLFetchResultsetValues of hstmt to aResultSet
            // Process aResultSet
            Send SQLClose of hstmt
        End
        Send SQLDisconnect of hdbc
    End
    Else Begin
        Showln (SFormat("SQLConnectionConnect could not connect to %1", sConnectString))
    End
End_Procedure

Build 6.2.0.11

  • Trying to open a table that does not exist in the SQL database raised an "Invalid cursor state" error. Now changed to "Table not in connection" error.
  • Added new driver-level setting LOGIN_ON_OPEN that can be set to 0 (False) or 1 (True). This setting controls whether during an open a login will be attempted if not already logged in on the connection. LOGIN_ON_OPEN can be specified in connectivity kit configuration files (mssqldrv.int, db2_drv.int, odbc_drv.int) or at runtime with the DF_DRIVER_LOGIN_ON_OPEN attribute.

New configuration file keyword: LOGIN_ON_OPEN - Possible values: 1 or 0 - Default value: 1 (true)

New driver-level attribute: DF_DRIVER_LOGIN_ON_OPEN - Possible values: 1 or 0

Example:

Get_Attribute DF_DRIVER_LOGIN_ON_OPEN of iDriverIndex to iLoginOnOpen
Set_Attribute DF_DRIVER_LOGIN_ON_OPEN of iDriverIndex to 0

If LOGIN_ON_OPEN is 1 when opening a table and there is no connection, the connectivity kit will attempt an automatic login (behaviour of earlier versions). If LOGIN_ON_OPEN is 0 when opening a table and there is no connection, the connectivity kit will not attempt to login, but will generate an error.

New cli.pkg: DF_LOGON_ON_OPEN attribute added.

Build 6.2.0.10 (includes merge from build 6.1.0.29)

ODBC_DRV

Oracle columns created as type INTEGER returned an incorrect length. Fixed.

All CLI Connectivity Kits

  • Changing DF_LENGTH of integer type columns is now an INT-file-only change (df_file_restructure_int_only). Only when length remains below max length for the integer types:
  • bigint 14
  • int 10
  • smallint 5
  • tinyint 3
  • When renumbering an index (DF_INDEX_NUMBER) that is the primary index, the df_file_primary_index must also be renumbered.

Build 6.2.0.9

Support for temporary indexes:

Temporary indexes are indexes that are created on the fly at runtime. They exist only as long as the table is open and are not created on the server.

  • Create_Index can now be done outside Structure_Start/Structure_End.
  • Setting DF_INDEX_* and DF_INDEX_SEGMENT_* attributes can now be done outside Structure_Start/Structure_End.
  • An index created outside Structure_Start/Structure_End will be a temporary index that exists only at runtime.
  • Temporary index will have type DF_INDEX_TEMPORARY for DF_INDEX_SQL_TYPE.
  • A temporary index can be deleted outside Structure_Start/Structure_End with Delete_Index.

New cli.pkg: DF_INDEX_TEMPORARY added as possible value for DF_INDEX_SQL_TYPE.

Example:

Handle hTable
Integer iIndex
Open Customer
Move Customer.File_Number to hTable
Create_Index hTable at iIndex
// Set Index Attributes: 2 segments
Set_Attribute DF_INDEX_NUMBER_SEGMENTS of hTable iIndex to 2
Set_Attribute DF_INDEX_SEGMENT_FIELD of hTable iIndex 1 to 4   // Column 4 == City
Set_Attribute DF_INDEX_SEGMENT_FIELD of hTable iIndex 2 to 1   // Column 1 == Customer_Number
Clear Customer
Move "Dallas" to Customer.City
Vfind hTable iIndex GT
Send Clear of Customer_DD
Move "Dallas" to Customer.City
Send Find of Customer_DD GT iIndex

Build 6.2.0.8

Fixed a bug where Create_Index did not adjust last_index_number properly.

Build 6.2.0.7

  • Bugfix: SQLConnect crashed when connecting with a non-existing connection ID.
  • Bugfix: Opening a table with no index definition in INT (system table!) crashed the driver.
  • DF_INDEX_SQL_TYPE of a recnum index (index.0) will not be set to DF_INDEX_SERVER_ONLY. Even when it is missing from the INT file it will be set to DF_INDEX_SERVER.
  • Made changes to push (renumber) server-only indexes always to the end of the index list:
  • When DF_INDEX_NUMBER is set to the number of a server-only index.
  • When the DF_INDEX_SQL_TYPE of an index is set to or from DF_INDEX_SERVER_ONLY.

Build 6.2.0.6

  • If a column appears as a segment in a server_only index, the field_index of the column will no longer be set during open.
  • When adding a new index (Create_Index) and server-only indexes are present, the new index will get the number of the first server-only index. The server-only index(es) will get their index number incremented so they remain at the end of the index list.
  • Added new attribute DF_INDEX_NUMBER that allows renumbering indexes.

Syntax:

Set_Attribute DF_INDEX_NUMBER of hTable iOldIndexNum to iNewIndexNum
  • If iOldIndexNum and iNewIndexNum are both existing indexes, the indexes will be switched.
  • If iOldIndexNum exists and iNewIndexNum is a non-existing index, after restructure iNewIndexNum will exist and there will be no iOldIndexNum.

Example:

Move 2 to iOldIndexNum
Move 3 to iNewIndexNum
Structure_Start hTable "MSSQLDRV"
Set_Attribute DF_INDEX_NUMBER of hTable iOldIndexNum to iNewIndexNum
Structure_End hTable DF_STRUCTEND_OPT_NONE

New cli.pkg: DF_INDEX_NUMBER added.

New MSSQLDRV_DriverDef.xml: DF_INDEX_NUMBER added.

Build 6.2.0.5

New attribute DF_FILE_RESTRUCTURE_INT_ONLY added.

This attribute returns true if structural changes were made that require ONLY writing a new table INT file. This attribute cannot be set.

DF_FILE_RESTRUCTURE_INT_ONLY provides additional information to the DF_FILE_RESTRUCTURE attribute.

If DF_FILE_RESTRUCTURE_INT_ONLY returns true, there will be no structural changes on the server; only the INT file will be changed. If DF_FILE_RESTRUCTURE_INT_ONLY returns false, the DF_FILE_RESTRUCTURE attribute will indicate if and what kind of restructure is needed.

Examples of changes that will require only rewriting the INT file: - Adding/removing/changing client-side indexes. - Change DF_Length of varchar(max) and varbinary(max) columns. - Change the DataFlex type of a SQL datetime column.

Note: DF_FILE_RESTRUCTURE_INT_ONLY will only return true if there are only INT file changes. If there are additional changes that do require server-side changes, DF_FILE_RESTRUCTURE_INT_ONLY will return false.

New cli.pkg: DF_FILE_RESTRUCTURE_INT_ONLY attribute added.

Build 6.2.0.4

New index attribute DF_INDEX_SQL_TYPE added. This attribute replaces DF_INDEX_ON_BACKEND. DF_INDEX_ON_BACKEND remains as a read-only attribute for backward compatibility, but should no longer be used.

DF_INDEX_SQL_TYPE possible values: - DF_INDEX_CLIENT - DF_INDEX_SERVER - DF_INDEX_SERVER_ONLY

Descriptions:

  • DF_INDEX_CLIENT
  • The index is a client-side index (not defined on the server). The index is defined in the table INT file and must include index number, index name and segments.

Example INT file snippet:

INDEX_NUMBER 3
INDEX_NAME Vendor003_CS
INDEX_NUMBER_SEGMENTS 2
INDEX_SEGMENT_FIELD 4
INDEX_SEGMENT_FIELD 1
INDEX_SEGMENT_DIRECTION DESCENDING

  • DF_INDEX_SERVER
  • The index is a server-side index and must be defined on the server. To map the SQL index name to a DataFlex index number, the index_number and index_name must be specified in the table INT file.

Example:

INDEX_NUMBER 2
INDEX_NAME Vendor002

  • DF_INDEX_SERVER_ONLY
  • The index is a server-side index, must be defined on the server, and is not defined in the table INT file.

New MSSQLDRV_DriverDef.xml: DF_INDEX_SQL_TYPE added.

New cli.pkg: DF_INDEX_SQL_TYPE added.

Build 6.2.0.3

During conversion, recnum index would be created as a client-side index. Fixed.

Build 6.2.0.2 (includes merge from 6.1.0.28)

  • The default for DF_INDEX_ON_BACKEND was false when creating a new index on a new table. This caused all indexes to be created as client-side indexes during conversion. Fixed.
  • On a standard table with an identity column (df_file_identity = true), when inserting or deleting a column before the identity column, the identity would not be adjusted. This caused identity insert errors during restructure. Fixed.

Build 6.2.0.1

Improved support for client-side indexes.

  • DF_INDEX_ON_BACKEND is now a read/write attribute. Default when creating a new index is true.
  • During restructure the index will move from client to server (or vice versa) if DF_INDEX_ON_BACKEND is changed. If DF_INDEX_ON_BACKEND is not changed, restructure will keep the index where it was.

Changed MSSQLDRV_DriverDef.xml: - df_index_on_backend changed from true to false.