DataFlex SQL Drivers 6.2 — Driver 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 save of 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
Setting attribute DF_INDEX_NAME for a temporary index caused an exception.
Changed cli.pkg — DF_INDEX_TEMPORARY had 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 hard-to-track errors: "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 Driverdb2_drv.dll— DataFlex DB2 Driverodbc_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 in 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- Added missing
df_index_sql_primary_keyanddf_index_clustered. - 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_sizeattribute. - 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 some specific situations (non-clustered index, primary key 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 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 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 keyword:
MINIMUM_CLIENT_VERSION
New attribute:
DF_DRIVER_MINIMUM_CLIENT_VERSION
For SQL Server the minimum client version can be set to one of the following:
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 will be 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. The
match_client_serversetting can be used to enforce this. - Using older clients with newer server versions may sometimes cause unpredictable results.
- A known issue is when using the SQL Server
datetype. This type was introduced in SQL Server 2008 and is not recognized by older clients. An older client will return SQL dates as string (df_ascii), which can cause incorrect date values.
Changed cli.pkg:
- Added DF_DRIVER_MINIMUM_CLIENT_VERSION attribute.
Changed dferr003.dat. Added:
- 12344 Structure change not allowed
- 12345 Minimum database client not found
Added to mssqldrv.pkg:
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_restructuredf_file_restructure_int_onlydf_file_allowed_structure_changesdf_index_sql_typedf_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 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 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” (SQL Server 2014 client) and “ODBC Driver 13 for SQL Server” (SQL Server 2016 client) 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 will still return all SQL Server instances on the network. Note: this function sometimes takes a long time.
Build 6.2.0.20 (includes merge from 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" */
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.
Notes:
- These type mappings only apply when adding/creating new columns. Existing columns will always keep their current type.
- These mappings apply when converting from an embedded database to SQL Server (effectively creating new columns).
- 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 2016.
Changed mssqldrv.int to reflect the new defaults.
All CLI Connectivity Kits
- Bug in
RedirectIdConnectStringcaused memory error in logout. Fixed. - Setting a constraint with accented characters did no OEM/ANSI translation. Fixed.
Build 6.2.0.19 (includes merge from 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 one of:
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 scenarios it may be desirable to allow only client-side changes; 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 (configurable in mssqldrv.int, db2_drv.int, odbc_drv.int). This setting accepts the same values as DF_FILE_ALLOWED_STRUCTURE_CHANGES:
ALL_TABLE_CHANGES_ALLOWED
ONLY_TABLE_INT_FILE_CHANGES_ALLOWED
NO_TABLE_CHANGES_ALLOWED
All Set_Attribute calls for table/file/field/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 will make 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. Fixed.
RedirectIdConnectString and RedirectIdConnectStringKeepLoggedIn now combined into a single function with bKeepLoggedIn parameter.
New RedirectIdConnectString function (defined in cCliHandler class in cli.pkg):
Function RedirectIdConnectString String sConnectionId String sConnectString Boolean bKeepLoggedIn Returns Integer
Description:
- Redirects a connection of a connection ID.
sConnectionIdmust contain a valid connection id (e.g.DFCONNID=MyID).sConnectStringmust contain a valid connectstring (e.g.SERVER=MyServer;DATABASE=MyDatabase;UID=MyName;PWD=MyPassword).RedirectIdConnectStringwill redirect from the old connection (server/database the connection id currently points to) to the new connection specified insConnectString.- All opened tables will be moved from the old connection to the 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 re-used on next redirect. - Returns:
0— redirection successful1— connection ID does not exist or cannot be found2— 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 will involve login to the new connection and logout from the old connection on every redirect. - If
bKeepLoggedIn = true: connections will remain open and be reused on next redirect.
Build 6.2.0.15
Amended version of RedirectIdConnectString function. Syntax and functionality are the same. The difference:
RedirectIdConnectStringwill logout of the old connection and login to the new connection on every redirect.RedirectIdConnectStringKeepLoggedInwill 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 (similar to issuing USE in SQL scripts). The default database is initially set to the database specified in the connectstring.
Example connectstring:
MssqlOrderID=SERVER=(local);DATABASE=MssqlOrder190;Trusted_Connection=yes
Get default database example:
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", sDefaultDatabase))
End
End
Function_Return sDefaultDatabase
End_Function
Change default database example:
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 and will point to the new database. It is expected that tables in both databases have identical structures.
Example:
// Let's assume this returns MssqlOrder190
Get GetDefaultDatabase to sOldDefaultDatabase
// Open table SalesP in database MssqlOrder190
Open SalesP
// Find a record in 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 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
(See the RedirectIdConnectString section in build 6.2.0.16 for full description and examples.)
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), conversion will now save zero dates as NULL in SQL Server.
Build 6.2.0.13 (includes merge from 6.1.0.30)
Setting the DD value of a text column, for example:
Set Field_Changed_Value of Customer_DD Field Customer.Comments to sText
Send Request_Save of Customer_DD
sTextvalue was the same as the value already inCustomer.Comments, or- 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 connectstring (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.
sConnectStringmust be an exact match, but comparison is case-insensitive.sConnectStringcan contain a connection id (for example:DFCONNID=MyConnectionID).- If no matching connectstring is found, this function will return
0. - This function will only work 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
// Send ProcessResultSet 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 previously 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 we are 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 DF_DRIVER_LOGIN_ON_OPEN attribute.
New configuration file keyword: LOGIN_ON_OPEN
Possible values: 1 or 0 (default 1)
New driver-level attribute: DF_DRIVER_LOGIN_ON_OPEN
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 (behavior of earlier versions). If LOGIN_ON_OPEN is 0 and there is no connection, the connectivity kit will not attempt to login and will generate an error.
New cli.pkg: DF_LOGON_ON_OPEN attribute added.
Build 6.2.0.10 (includes merge from 6.1.0.29)
ODBC_DRV
Oracle columns created as type INTEGER returned an incorrect length. Fixed.
All CLI Connectivity Kits
- Changing
DF_Lengthof integer type columns is now an INT-file-only change (df_file_restructure_int_only) when the new length remains below maximums for integer types: bigint— 14int— 10smallint— 5-
tinyint— 3 -
When renumbering an index (
DF_INDEX_NUMBER) that is the primary index, thedf_file_primary_indexmust also be renumbered.
Build 6.2.0.9
Temporary indexes support
Temporary indexes are indexes created on the fly at runtime. They exist only while the table is open and are not created on the server. Temporary indexes are created like regular indexes but must be created outside Structure_Start / Structure_End.
Create_indexcan now be done outsideStructure_Start/Structure_End.- Setting
DF_INDEX_*andDF_INDEX_SEGMENT_*attributes can now be done outsideStructure_Start/Structure_End. - An index created outside
Structure_Start/Structure_Endwill be a temporary index that only exists at runtime. - Temporary index will have type
DF_INDEX_TEMPORARYforDF_INDEX_SQL_TYPE. - A temporary index can be deleted outside
Structure_Start/Structure_EndwithDelete_Index.
New in cli.pkg: added DF_INDEX_TEMPORARY as possible value for DF_INDEX_SQL_TYPE attribute.
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
Bugfixes:
SQLConnectcrashed when connecting with a non-existing connection ID. Fixed.- Opening a table with no index definition in INT (system table) crashed the driver. Fixed.
DF_INDEX_SQL_TYPEof a recnum index (index.0) will not be set toDF_INDEX_SERVER_ONLY. Even when missing from the INT file, it will be set toDF_INDEX_SERVER.- Made changes to push (renumber) server-only indexes always to the end of the index list:
- When
DF_INDEX_NUMBERis set to the number of a server-only index. - When the
DF_INDEX_SQL_TYPEof an index is set to or fromDF_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
iOldIndexNumandiNewIndexNumare both existing indexes, the indexes will be switched. - If
iOldIndexNumexists andiNewIndexNumis a non-existing index, after restructureiNewIndexNumwill exist and there will be noiOldIndexNum.
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 in cli.pkg: DF_INDEX_NUMBER added.
New in 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 it 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.
- Changing
DF_Lengthofvarchar(max)andvarbinary(max)columns. - Changing the DataFlex type of SQL
datetimecolumn.
Note: DF_FILE_RESTRUCTURE_INT_ONLY will only return true if there are only INT file changes. If there are additional changes that require server-side changes, DF_FILE_RESTRUCTURE_INT_ONLY will return false.
New in cli.pkg: DF_FILE_RESTRUCTURE_INT_ONLY 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 can have the following values:
DF_INDEX_CLIENT— client-side index (not defined on the server). Index definition must exist in the table INT file.DF_INDEX_SERVER— server-side index. The index must be defined on the server. To map SQL index name to a DataFlex index number,INDEX_NUMBERandINDEX_NAMEmust be specified in the INT file.DF_INDEX_SERVER_ONLY— server-side index that is not defined in the table INT file.
Examples:
DF_INDEX_CLIENT INT file example:
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 INT file example:
INDEX_NUMBER 2
INDEX_NAME Vendor002
New MSSQLDRV_DriverDef.xml: added DF_INDEX_SQL_TYPE.
New cli.pkg: added DF_INDEX_SQL_TYPE.
Build 6.2.0.3
During conversion the recnum index was 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.
Attribute 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.