0% found this document useful (0 votes)
202 views

Release Notes

The Zeos Team announces the release of Zeos 7.2.14 as the newest stable version. It deprecates prior 7.2 versions and urges users to upgrade from older versions. This release fixes issues compiling with FPC 3.2.2. Zeos 7.2.12 addressed problems with committing transactions, sorting strings, detecting stored procedures, reading metadata of attached databases, and character set conversion with ADO on FPC 3.2. Users experiencing issues should contact support.

Uploaded by

Raga Silinapas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
202 views

Release Notes

The Zeos Team announces the release of Zeos 7.2.14 as the newest stable version. It deprecates prior 7.2 versions and urges users to upgrade from older versions. This release fixes issues compiling with FPC 3.2.2. Zeos 7.2.12 addressed problems with committing transactions, sorting strings, detecting stored procedures, reading metadata of attached databases, and character set conversion with ADO on FPC 3.2. Users experiencing issues should contact support.

Uploaded by

Raga Silinapas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Zeos 7.2.

14 Release Notes

Jan Baumgarten

July 14, 2021


Contents

1 Zeos 7.2.14 Release Notes 5


1.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.1 Zeos now compiles with FPC 3.2.2 . . . . . . . . . . . 5

2 Zeos 7.2.12 Release Notes 6


2.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.1 ZConnection.Commit doesn’t call ApplyUpdates . . . 6
2.1.2 Sorting of strings . . . . . . . . . . . . . . . . . . . . . 6
2.2 MariaDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1 Support for MariaDB Connector/C 3.2+ / MariaDB
10.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Firebird . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.1 detection of selectable sored procedures . . . . . . . . 7
2.4 SQLite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4.1 metadata of attached databases . . . . . . . . . . . . . 7
2.5 ADO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5.1 character set conversion issue on FPC 3.2 . . . . . . . 7

3 Zeos 7.2.10 Release Notes 8


3.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4 Zeos 7.2.8 Release Notes 9


4.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

1
4.1.1 Newly introduced Features . . . . . . . . . . . . . . . . 9
4.1.2 Known Problems . . . . . . . . . . . . . . . . . . . . . 10
4.2 MySQL / MariaDB . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2.1 Fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2.2 Known problems that will not get fixed . . . . . . . . . 10
4.3 PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.3.1 Support for stored procedures . . . . . . . . . . . . . . 11
4.3.2 changed support for XML and JSON data type . . . . 11
4.4 SQLite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.4.1 possibly breaking changes . . . . . . . . . . . . . . . . 11
4.4.2 New Features . . . . . . . . . . . . . . . . . . . . . . . 11
4.5 Firebird / Interbase . . . . . . . . . . . . . . . . . . . . . . . . 12
4.6 dblib (MS SQL Server / Adaptive Server Enterprise) . . . . . 12
4.6.1 Fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.6.2 Known Problems . . . . . . . . . . . . . . . . . . . . . 13
4.7 Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.7.1 Authentication mode . . . . . . . . . . . . . . . . . . . 13
4.7.2 Multi Threading . . . . . . . . . . . . . . . . . . . . . 13

5 Zeos 7.2.6 Release Notes 14


5.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.1.1 New C++ Builder Packages . . . . . . . . . . . . . . . 14
5.1.2 Fixed Bugs . . . . . . . . . . . . . . . . . . . . . . . . 14
5.1.3 Changes . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.1.4 Known problems . . . . . . . . . . . . . . . . . . . . . 15
5.2 Firebird / Interbase . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2.1 Fixed Bugs . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2.2 Breaking Changes . . . . . . . . . . . . . . . . . . . . 16
5.2.3 Changes . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2.4 Known Problems . . . . . . . . . . . . . . . . . . . . . 18

2
5.3 SQLite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.3.1 Fixed Bugs . . . . . . . . . . . . . . . . . . . . . . . . 18
5.3.2 Breaking Changes . . . . . . . . . . . . . . . . . . . . 18
5.3.3 Changes . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.4 MySQL / MariaDB . . . . . . . . . . . . . . . . . . . . . . . . 19
5.4.1 Fixed Bugs . . . . . . . . . . . . . . . . . . . . . . . . 19
5.4.2 Breaking Changes . . . . . . . . . . . . . . . . . . . . 20
5.4.3 Known Problems . . . . . . . . . . . . . . . . . . . . . 20
5.5 SAP / Sybase ASE . . . . . . . . . . . . . . . . . . . . . . . . 20
5.5.1 Known Problems . . . . . . . . . . . . . . . . . . . . . 20
5.6 Sybase / SAP ASA . . . . . . . . . . . . . . . . . . . . . . . . 21
5.7 PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.7.1 Fixed Bugs . . . . . . . . . . . . . . . . . . . . . . . . 21
5.7.2 Changes . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.7.3 Known problems . . . . . . . . . . . . . . . . . . . . . 21

6 Zeos 7.2.4 Release Notes 22


6.1 General Changes . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.1.1 Supported compilers . . . . . . . . . . . . . . . . . . . 22
6.1.2 Date and Time format settings . . . . . . . . . . . . . 22
6.1.3 Batch Loading . . . . . . . . . . . . . . . . . . . . . . 23
6.2 Behaviour changes . . . . . . . . . . . . . . . . . . . . . . . . 25
6.2.1 Case sensitivity of the TZMetadata object and DBC
layer meta data functions . . . . . . . . . . . . . . . . 25
6.2.2 PostgreSQL autocommit and OID columns . . . . . . 25
6.2.3 FreeTDS default library name . . . . . . . . . . . . . . 26
6.2.4 Automatic opening of connections . . . . . . . . . . . . 26
6.2.5 IZConnection.GetMetadata will automatically connect
now . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.3 Driver specific changes . . . . . . . . . . . . . . . . . . . . . . 26

3
6.3.1 PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . 26
6.3.2 Firebird / Interbase . . . . . . . . . . . . . . . . . . . 27
6.3.3 MySQL / MariaDB . . . . . . . . . . . . . . . . . . . 28
6.3.4 MS SQL / SAP ASE (Sybase ASE) . . . . . . . . . . . 28
6.3.5 Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.3.6 ADO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.3.7 SQLite . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

7 Known Problems 31

8 The future development of Zeos 32

Zeos 7.2
The Zeos Team is proud to announce the availability of Zeos 7.2.14 as a sta-
ble release. This is the newest stable version of Zeos. It deprecates Zeos
7.1, and all prior versions of Zeos 7.2 which will not be supported any-
more. Zeos 7.2 has seen tons of bug fixes and improvements. We urge all
people still using older versions of Zeos to upgrade. If you have any prob-
lems with Zeos 7.2, please get in contact with us on the forums (http://
zeoslib.sourceforge.net) or on the bugtracker (https://sourceforge.
net/p/zeoslib/tickets/).

4
Chapter 1

Zeos 7.2.14 Release Notes

1.1 General

1.1.1 Zeos now compiles with FPC 3.2.2


Because of a change in the 3.2 series of FPC previous versions of Zeos don’t
compile on FPC 3.2.2. This has been fixed.

5
Chapter 2

Zeos 7.2.12 Release Notes

2.1 General

2.1.1 ZConnection.Commit doesn’t call ApplyUpdates


In versions starting with Zeos 7.2.8 TZConnection.Commit called ApplyUp-
dates of all connected datasets. This behavior prevented use cases where
cached changes in different datasets were to be committed in different trans-
actions. ZConnection.Commit doesn’t interfere with cached updates any-
more. If you want caches updates to be applied before a transaction gets
committed, call the ApplyUpdates method of the respective datasets before.

2.1.2 Sorting of strings


Previous versions of Zeos didn’t sort strings correctly under some circum-
stances. This was fixed.

2.2 MariaDB

2.2.1 Support for MariaDB Connector/C 3.2+ / Mari-


aDB 10.6
Starting with MariaDB Connector/C version 3.2.2 MariaDB changed the ver-
sion number returned by mysql_get_client_version to be the version num-

6
ber of the client library and not the version number of the server it was
distributed with. This lead Zeos to think, it talks to an old client library and
made it read data structures for field type definitions wrongly. Zeos 7.2.12
fixes this and so supports MariaDB Connector/C 3.2. MariaDB Connector/C
3.2 is distributed alongside MariaDB 10.6.

2.3 Firebird

2.3.1 detection of selectable sored procedures


Previous versions Zeos tried to detect selectable stored procedures starting
with Firebird 1.5. This lead to problems because the required metadata fields
were only added in Firebird 2.1. This has been fixed.

2.4 SQLite

2.4.1 metadata of attached databases


In previous versions Zeos didn’t read metadata information of attached databases
correctly. This could lead to all sorts of problems where Zeos relies on meta-
data information to function correctly. This has been fixed.

2.5 ADO

2.5.1 character set conversion issue on FPC 3.2


Zeos 7.2.8 introduced support for the new codepage aware string field in
FPC 3.2. Unfortunately we didn’t assign the correct character set when
using ADO. This has been fixed for Zeos 7.2.12.

7
Chapter 3

Zeos 7.2.10 Release Notes

3.1 General
Zeos 7.2.10 contains some minor bugfixes but mainly exists to fix a problem
that kept the SQLite driver from compiling on newer Delphi versions. No
other changes exist in this release.

8
Chapter 4

Zeos 7.2.8 Release Notes

4.1 General

4.1.1 Newly introduced Features


Sequence support for several servers and protocols

Zeos now implements additional sequence support for the following servers:

• Adaptive Server Anywhere

• Adaptive Server Enterprise

• Cubrid

• DB2

• Informix

• Microsoft SQL Server

• Oracle

For Servers that don’t have their own protocols in Zeos Sequences are sup-
ported using the ADO bridge. Firebird, Interbase and PostgreSQL already
had support for sequences.

9
Support for Character Set aware TStringField on FPC 3.2

On Free Pascal 3.2 Zeos 7.2 now supports setting the character set awareness
of TStringField. Because of this the Size property now reports the correct
size. This should have a direct impact on all GUI controls using this property.

4.1.2 Known Problems


When using Cached Updates, it is not possible to add a row and then edit
that row before posting to the database. This bug cannot be fixed in Zeos 7.2.
It has been fixed in the upcoming Zeos 8.0. Please use database transactions
instead.

4.2 MySQL / MariaDB

4.2.1 Fixes
The following improvements were done for the MySQL / MariaDB driver:

• Zeos now supports new options, introduced in MySQL 8, like MYSQL_-


OPT_GET_SERVER_PUBLIC_KEY.

• Zeos can now distinguish between MySQL and MariaDB. Users that
need this possibility, should check out TZMySQLDatabaseInfo.Get-
DatabaseProductName on the DBC layer.

4.2.2 Known problems that will not get fixed


Zeos 7.2 only supports the datetime type with up to three decimal places.
So datetime(4), datetime(5) and datetime(6) are not supported by Zeos 7.2.
Support for these is implemented in the Zeos 8.0 Beta.

10
4.3 PostgreSQL

4.3.1 Support for stored procedures


Zeos 7.2 now supports procedures as introduced with PostgreSQL 11. They
get used in the same way as functions get used, namely TZStoredProc on
the component layer and IZCallableStatement on the DBC layer.

4.3.2 changed support for XML and JSON data type


Fields of type XML and JSON were mapped to string fields in earlier versions.
Starting with this version, XML and JSON fields get mapped to fields of type
ftMemo or ftWideMemo.

4.4 SQLite

4.4.1 possibly breaking changes


The sqlite driver now understands the UNSIGNED keyword in column dec-
larations. Until Zeos 7.2.6 this keword was ignored and all columns were
unsigned. So columns might change type now, i.e. columns of type stShot
(Short Int) get stByte (Byte).

4.4.2 New Features


Wildcard searches in SQLite metadata

The sqlite driver now supports using wildcards in GetColumns. This im-
proves the possibilities for fetching metadata on table columns using TZSql-
Metadata.

Support for enable_load_extension and load_extension

The sqlite driver now supports using enable_load_extension and load_extension.


To use these, one currently has to dig up the plain driver interface. There
they were added to the IZSQLiteConnection interface on the DBC layer of
Zeos. For a documentation on how to use them, please refer to the SQLite

11
documentation (https://www.sqlite.org/c3ref/enable_load_extension.
html, https://www.sqlite.org/c3ref/load_extension.html).

Support for Thread Safety

The SQLite driver now can be configured to use sqlite3_open_v2 by set-


ting at least one of two new parameters: SQLiteOpen_Flags and SQLi-
teOpen_zVfs were introduced. If one of these parameters is set, the SQLite
driver will use flags, so one configure SQLite to be usable in a thread safe man-
ner. SQLiteOpen_Flags maps to the flags parameter of sqlite3_open_v2.
SQLiteOpen_zVfs maps to the zVfs parameter of sqlite3_open_v2. For the
usage of these parameters please refer to the SQLite documentation (http:
//sqlite.org/c3ref/open.html). When configured for thread safety, the
same rules apply as for all other drivers: One connection and all compo-
nents that connect to it must be in the same thread. Use one connection per
thread.

4.5 Firebird / Interbase


• Starting with Firebird 3.0 Firebird supports SQL statements with up
to 10MB. Zeos now can use these statements. They may not contain
the #0 character because it gets used as a terminator there.

• Zeos has seen some changes to make it work better on Interbase servers.

• Zeos 7.2 is now prepared to meet Firebird 4.0 in the wild. New data
types are not supported. Zeos instructs Firebird 4.0 to enable legacy
translation on these data types. If you neeed these new data types,
please switch to Zeos 8.0.

4.6 dblib (MS SQL Server / Adaptive Server


Enterprise)

4.6.1 Fixes
• Zeos now has a correct implementation of dbsettime. Using this func-
tion users can set a timeout for the execution of SQL statements.

12
• Zeos has seen some changes that make it compatible with Microsoft
SQL Server 2000 again.

4.6.2 Known Problems


The Zeos team has seen lockups with Microsoft SQL Server 2000 when
a wrong user password was supplied. This was seen in conjunction with
FreeTDS. We are not sure wether this is a bug in MS SQL Server 2000,
FreeTDS or Zeos. Please migrate to newer versions if at all possible. We
didn’t see this problem there.

4.7 Oracle

4.7.1 Authentication mode


Zeos now has a new parameter OCIAuthenticateMode to manipulate the OCI
authentication mode. For more information see https://docs.oracle.com/
cd/B10501_01/appdev.920/a96584/oci15r13.htm.

4.7.2 Multi Threading


Zeos now can be used in a multi threaded way on Oracle. If the new boolean
parameter ”‘OCIMultiThreaded”’ is set, Zeos passes ”‘OCI_THREADED”’
to the Oracle client library. When this option is set, Zeos can be used
in the usual Zeos way: One connection per thread. For more information
on ”‘OCI_THREADED”’ see https://docs.oracle.com/cd/B10501_01/
appdev.920/a96584/oci09adv.htm.

13
Chapter 5

Zeos 7.2.6 Release Notes

5.1 General

5.1.1 New C++ Builder Packages


This release of Zeos has new packages for C++ Builder versions 2006, 2009,
XE2 and XE 10.2. Each package subdirectory conatins a Manual-ZeosDbo-
*.txt file that has detailed installation instructions. For C++ Builder 2006
the necessary files are generated using the Delphi 2006 package files. See
Manual-ZeosDbo-2006.txt for more information.

5.1.2 Fixed Bugs


• 253: Zeos had an issue that prevented it from filtering on computed
columns which was fixed.

• 252: TZConnection.AutoEncodeStrings was not restored correctly on


ANSI Delphis (anything until Delphi 2007) and on Lazarus.

• A bug about metadata caching was fixed that could lead to the TZSQL-
Metadata not giving correct results if meta data for the same object
was queried a second time. See http://zeoslib.sourceforge.net/
viewtopic.php?f=40&t=73973 for more information.

• 369: A bug has been fixed, where a filter didn’t work correctly on the
last letter of a character column.

14
• 356: When a select contains multiple tables and fields were selected
using the table alias name and when the ”first M skip N” option is
present, the first field may be missing in the result set.

5.1.3 Changes
binary connection strings are deprecated

Use of character sets that move the correct interpretation of strings to the
client side is deprecated with this release. We will discontinue support for
these connection strings with the Zeos 8.0 release. In Zeos 8.0 usage of
these character sets as connection character sets will lead to an exception.
Background: Zeos tries to preserve your data. The database systems usually
are better at character set conversions than we are. So we decided to fully
rely on them. On Firebird and Interbase these are the character sets ”none”
and ”octetts”. On PostgreSQL this is the character set SQL_ASCII. On
MySQL and MariaDB this is the character set ”BINARY”.

Limited support for TGraphicField

Zeos now supports the use of persistent TGraphicField components with


drivers that support BLOB fields.

5.1.4 Known problems


Filtering on computed columns or lookup columns does not work

Filtering on computed columns or lookup columns will generate an exception:


”Column with index -1 is not accessible”. This will not be fixed in Zeos 7.2
because it requires a major rewrite of the filtering mechanism.

No support for BCD type columns

Zeos currently doesn’t support the BCD type columns of Delphi. NUMERIC
and DECIMAL columns still get mapped to floating point types. This will
be adressed in Zeos 8.0 because it requires a lot of changes in the Zeos core.

15
Metadata Caching

Zeos will usually agressively cache metadata of your database. Because of


this scenarios where your database structure is changing constantly, are not
well supported. You can call ZConncection.DbcConnection.GetMetadata.-
ClearCache to clear out the caches. You can also disable the UseMetadata
property of the TZConnection object. All data sets will become readonly in
that case. Use TZUpdateSQL if you need them to be writable again.

Blob fields are read as a whole

As soon as you touch a blob field for reading, Zeos will fetch the whole
blob contents from the database server. This may lead to high memory
consumption.

5.2 Firebird / Interbase

5.2.1 Fixed Bugs


• 249: In previous versions of Zeos the Firebird driver silently only copied
parts of string parameters to the server if the client library didn’t pro-
vide enough buffer space for the whole string. This has been rectified.
Zeos will now throw an exception in these cases. As a workaround you
might want to explicitly cast your parameters - i.e. where :param =
’x’ becomes where cast(:param as varchar(50)) = ’x’.
• 351: Firebird: A bug has been fixed where NUMERIC and DECIMAL
columns could be converted to different field types depending an the
way they were selected.

5.2.2 Breaking Changes


field types for NUMERIC and DECIMAL

There was a bug in the interbase / firebird driver where NUMERIC and
DECIMAL fields could be assigned different field types. This bug has been
fixed but can lead to problems because now on persistent fields and typecasts
in your cource code because Zeos might assign a different field type to your
fields than it assigned before.

16
Value Description
inet This will create a connection string to be used with TCP/IP. If the server
name is empty, localhost will be used as the server name.
wnet This will create a connection string to be used with named pipes. If the
server name is empty, a connection to a local server will be created.
xnet On Firebird 3 this will force the client library to use an xnet (shared
memory) connection to a local server. On Interbase and Firebird 2.5
and below the embedded server cannot be forced to use xnet, while the
regular client library will always use xnet in that case. The server name
will be ignored with this setting.
local This value will try to do a local connection. This will only work with
embedded servers. Regular client libraries will usually fall back into using
xnet.
Table 5.1: values for fb_protocol

5.2.3 Changes
new connection parameter fb_protocol

The new parameter ”fb_protocol” was introduced as a connection parameter.


With Firebird 3 this paramater switches Zeos to use url style connection
strings. This enables you to force the library to use xnet for connecting to
the server, bypassing a local engine12. This parameter also allows you to
use the wnet (Named Pipes) protocol on older versions of Firebird and on
Interbase. For possible values of fb_protocol see table 5.1 on Page 17.

reading the client library version

The firebird/interbase driver now can read the client library version of Fire-
bird 1.5+ and Interbase 7.0+.

Unicode characters in database name

If a firebird 2.5+ library is detected, Zeos passes the database name using
UTF8, allowing all Unicode characters to be used.

17
new default mode for read committed on Firebird 4.0

On Firebird 4.0 Zeos uses the new read committed default mode ”READ
COMMITTED READ CONSISTENCY” when it detects a Firebird 4.0+
server version.

5.2.4 Known Problems


no support for identity columns

Firebird 3.0 introduced a new feature called ”IDENTITY columns”. These


columns can use an internal generator to automatically create their values.
Zeos currently does not support using these columns. It cannot read back
values that were assigned to these columns automatically.

The tokenizer does not understand single line comments

The Zeos tokenizer for Firebird and Interbase does not understand single
line comments. As a workaround we suggest you use multi line comments,
as shown in the following listing:
-- this single line comment is not suported

/* use this multi line comment instead */

5.3 SQLite

5.3.1 Fixed Bugs


• 248: selecting the rowid in a table made Zeos move a Query into Read-
Only mode bacause it thought that rowid was not part of the table.
This has been fixed.

5.3.2 Breaking Changes


Varchar fields without a length specifier

In previous versions of Zeos Varchar fields without a length specifier were


mapped as TStringField fields. Zeos now maps them as TMemoField since

18
Zeos doesn’t have any idea on how long you want the contents of these fields
to be. Use the parameter Undefined_Varchar_AsString_Length to get the
old behaviour and specify a length that you are comfortable with. I.e. use
Undefined_Varchar_AsString_Length=40.

5.3.3 Changes
extended error information

The SQLite driver of Zeos 7.2 now can get extended error information from
SQLite and provide much better error descriptions. In Zeos 8.0 this will
be the default. In Zeos 7.2 we introduced the new parameter ExtendedEr-
rorMessage to enable the behaviour. Setting this parameter to 1 / Yes / true
will get you the extended error messages. This parameter will not exist in
Zeos 8.0 anymore.

backup API

We added the SQLite backup API to the plain driver. A working exam-
ple how to use it can be found on http://zeoslib.sourceforge.net/
viewtopic.php?f=40&p=126408

5.4 MySQL / MariaDB

5.4.1 Fixed Bugs


• 255: The ability to use the Bit(1) datatype as a boolean data type
is now correctly determined even if the MariaDB client and MySQL
server are mixed with each other.

• Reading metadata about stored procedures from MySQL 8.0 now works.
This had side effects on the way Metadata is read. For more informa-
tion see 5.4.2 stored procedures metadata, Page 20.

19
5.4.2 Breaking Changes
stored procedures metadata

Until Zeos 7.2.4 when querying for procedure columns (parameters) the
database name was returned in the PROCEDURE_CAT column. PROCE-
DURE_CAT now always returns ”def” while the database is returned in the
PROCEDURE_SCHEM column. This is more in line with other MySQL
metadata queries and also with MySQL / MariaDb themselves. Also the
scale for NUMERIC and DECIMAL now is returned in the SCALE column
and not in the LENGTH column anymore. If you relied on this behavior
your code might break!

5.4.3 Known Problems


using TZUpdateSQL

The TZUpdateSQL component will raise an error if a record is posted to the


connected Dataset where no values were changed. This is because MySQL
/ MariaDB returns the number of changed records by default. If a record
didn’t change, 0 is returned instead. See https://dev.mysql.com/doc/
refman/8.0/en/mysql-affected-rows.html for more information. This
can be mitigated by adding ”CLIENT_FOUND_ROWS=1” to the TZCon-
nection.Properties property.

5.5 SAP / Sybase ASE

5.5.1 Known Problems


unichar / univarchar / unitext doesn’t work

Using unichar / univarchar / unitext columns with the sybase driver doesn’t
work. Use freetds if you need this to work.

20
5.6 Sybase / SAP ASA
We did a large amount of improvements that have no ticket number assigned.
Please let us know if you find problems in the ASA driver.

5.7 PostgreSQL

5.7.1 Fixed Bugs


• 246: Zeos had a problem where it couldn’t clean up its internal state
correctly in the event of a connection loss to the server. This has been
fixed.

• 274: The TZPGEventAlerter component now works correctly in a 64


bits environment.

• 350: PostgreSQL: It wasn’t possible to correctly execute stored func-


tions on PostgreSQL without unpreparing them first.

5.7.2 Changes
support for citext

We added support for the citext module. See https://www.postgresql.


org/docs/current/citext.html for more information on citext.

5.7.3 Known problems


using stored procedure is not possible

Recent versions of PostgreSQL introduced the new stored procedures - as


opposed to stored functions, which have been part of PostgreSQL for quite
some time now. Zeos 7.2.6 does not support using PostgreSQL stored proce-
dures with the TZStoredProc component. Stored functions continue to work
as before.

21
Chapter 6

Zeos 7.2.4 Release Notes

6.1 General Changes

6.1.1 Supported compilers


Zeos 7.2 supports Delphi versions from Delphi 7 to XE 10.2 Tokyo. Only
the Win32 and Win64 compilers are supported. Other platforms utilizing
the NextGen compiler are not (yet) supported. The Free Pascal compiler is
supported from version 2.6 to version 3.0. Older versions might work but
don’t get official suport by us anymore.

6.1.2 Date and Time format settings


Zeos now supports specifying date and time format settings that will be
used if Zeos doesn’t know how to correctly format date and time settings
for the DBMS to understand them. This feature gets used with emulated
parameters in ADO - if the FoxPro driver is used for example. These new
parameters can be set in the TZConnection.Properties property. The format
of these parameters conforms to the usual Delphi standards. The following
new parameters are supported:

• DateReadFormat

• DateWriteFormat

• DateDisplayFormat

22
• TimeReadFormat

• TimeWriteFormat

• TimeDisplayFormat

• DateTimeReadFormat

• DateTimeWriteFormat

• DateTimeDisplayFormat

The ReadFormat parameters decribe the date and time formats as the data-
base sends them to the application. The WriteFormat parameters describe
the date and time formats as the application should send them to the database.
The DisplayFormat settings are used for strings that are supplied by the
application to Zeos. These settings can be used to solve problems on the
following drivers:

• dblib (FreeTDS, mssql, sybase)

• postgresql

• mysql (depending on parameter preferprepared, used if preferprepared


is not set)

• ado (emulated parameters, see 6.3.6 ADO, Page 29)

6.1.3 Batch Loading


We added API support for batch loading of data into databases that sup-
port this feature. Currently this feature is only available at the DBC layer.
Assume the following example:
uses Types , ZVariant , ZDbcIntfs ;

procedure Example . InsertBatchIntoForBar ( const Connection :


IZConnection );
var
Value_NullArray : TBooleanDynArray ;
ID_IntArray : TIntegerDynArray ;
Value_StringArray : TStringDynArray ;
I: Integer ;
Stmt: IZPreparedStatement ;
begin

23
Connection . SetAutoCommit ( False );
try
SetLength ( Value_NullArray , 10);
SetLength ( ID_IntArray , 10);
SetLength ( Value_StringArray , 10);
for i := 0 to 9 do begin
ID_IntArray [i] := i;
{every other string is null in our example }
if i mod 2 = 0 then begin
Value_NullArray [i] := False ;
Value_StringArray [i] := SysUtils . IntToStr (i);
end else begin
Value_NullArray [i] := True;
end;
end;
{ assume the id field is not nullable , so we don 't need a
null indicator array }
Stmt := Connection . PrepareStatement (
'insert into FooBar (ID , AValue ), values (? ,?) '
);
Stmt. SetDataArray ( FirstDbcIndex , ID_IntArray , stInteger );
{ $IFDEF UNICODE }
Stmt. SetDataArray ( FirstDbcIndex +1, Value_StringArray ,
stString , ZVariant . vtUnicodeString );
{ $ELSE }
Stmt. SetDataArray ( FirstDbcIndex +1, Value_StringArray ,
stString , ZVariant . vtRawByteString );
{ $ENDIF }
Stmt. SetNullArray ( FirstDbcIndex +1, stBoolean ,
Value_NullArray );
I := Stmt. ExecuteUpdatePrepared ;
Assert (i = 10, 'WrongUpdateCount ');
Connection . Commit ;
except
Connection . Rollback
end;
end;

First we start a new transaction using SetAutoCommit(False). This is


for several reasons:

• we get better performance, which always should be good ;-)

• For some databases Zeos will generate more than one insert statement.
If we were in autocommit mode, one wouldn’t be able to roll back the
complete insert if a problem arises at the end of the batch.

24
Afterwards we prepare array that contain the values to be inserted. In a
real world example you most probably already have read them from a file.
Since typed arrays can’t contain null values, a separate array can be pre-
pared that tells Zeos which values are to be set to null (Value_NullArray).
So you can pass two arrays per column: One containing the actual values
(ID_IntArray, Value_StringArray) and one containing rows that are to be
set to null (Value_NullArray). We don’t create an ID_NullArray because
in our example we assume the the ID field is not nullable. Please note: You
may not delete or modify the arrays until you have imported them because
Zeos will only store pointers to the arrays and not the actual arrays. Finally
we call ExecuteUpdatePrepared to do the actual import.
Please note that we use FirstDbcIndex for generating column indexes.
This is because Zeos can be compiled in two modes: One where the col-
umn index starts with 1 and one where the colulmn index starts with 0.
FirstDbcIndex will be set accordingly.

6.2 Behaviour changes

6.2.1 Case sensitivity of the TZMetadata object and


DBC layer meta data functions
If you call Metadata functions on the DBC layer or use the TZMetadata ob-
ject be sure that the case of the object name that you retrieve information for
is in the correct case. Zeos will not do any guesswork - it will simply query
the underlying database for the identifier that you supply. Example: In for-
mer versions of Zeos the call GetColumns(’PEOPLE’) might have returned
information for the table people. This will not happen anymore. To query in-
formation about the table people you will have to use GetColumns(’people’).
If you want the former behavior restored, your call has to be like this:
GetColumns(IZConnection.GetMetadata.NormalizePatternCase(’PEOPLE’))

6.2.2 PostgreSQL autocommit and OID columns


The postgresql driver now uses the native autocommit of PostgreSQL. Writ-
ing to OID BLOBs only works in explicit transactions because of this. This
is a limitation in PostgreSQL and cannot be fixed in Zeos. The proposed
workaround is to use the bytea data type. For more information see https://

25
www.postgresql.org/message-id/002701c49d7e%240f059240%24d604460a%
40zaphod.

6.2.3 FreeTDS default library name


The FreeTDS drivers now uses sybdb.dll / sybdb.so as the default library
to load. Watch out if your program doesn’t set the LibraryPath property in
TZConnection.

6.2.4 Automatic opening of connections


In the past the drivers for MySQL, ADO and SQLite automatically opened
a connection as soon as the connection object was created. This is changed.
No driver will connect automatically anymore. Call the connect method to
open the connection. This change only affects users of the DBC layer.

6.2.5 IZConnection.GetMetadata will automatically con-


nect now
This change is on the DBC layer. Calling IZConnection.GetMetadata will
connect to the database now in all cases. In previous versions of Zeos this
wasn’t guaranteed, leading to undefined behaviour, depending on wether the
IZConnection was already connected or not.

6.3 Driver specific changes

6.3.1 PostgreSQL
• The postgresql driver now uses the native autocommit of PostgreSQL.
OID columns can no longer be written to in autocommit mode. See
6.2.2 PostgreSQL autocommit and OID columns, Page 25.

• GUID columns are now supported.

• New parameters, so PostgreSQL can connect using SSL (sslmode, re-


quiressl, sslcompression, sslcert, sslkey, sslrootcert, sslcrl). Take a look
at the PostgreSQL documentation on how to use these parameters.

26
• Zeos now can use SSPI, Kerberos and Windows Authentication with
PostgreSQL. Just leave the username and password empty for this.

• The PostgreSQL driver now maps the transaction isolation levels tiNone
and tiReadUncommitted to tiReadCommitted. It is no longer valid to
use your own transaction handling code. Please use the TZConnection
methods StartTransaction, Commit and Rollback.

• The PostgreSQL driver now supports read only transactions.

• The PostgreSQL driver now supports +Infinity, -Infinity and NaN for
floating point values.

• Using date and time format settings with PostgreSQL is now sup-
ported. Since Zeos sends date and time paramaters to the server as
strings, problems with formatting can arise. If you have problems, try
changing the date and time format settings. For more information see
6.1.2 Date and Time format settings, Page 22.

• If you still use PostgreSQL 7 databases, we urge you to move on to a


newer version. PostgreSQL 7 is deprecated with this version and will
be removed with Zeos 8.0.

6.3.2 Firebird / Interbase


• We added support for Firebird 3.0.

• We added a new parameter to enable Firebird 3 wire compression:


wirecompression. Setting it to 1/Yes/True will enable Firebird 3 wire
compression.

• Zeos now supports Firebird 3.0 boolean fields.

• We reenabled the use of Firebird and Interbase autocommit.

• We added support for the new DBC layer batch loading API to the Fire-
bird / Interbase driver. For more information see 6.1.3 Batch Loading,
Page 23.

• If you still use Interbase 5 databases, we urge you to move on to a


newer version. Interbase 5 is deprecated with this version and will be
removed with Zeos 8.0.

27
6.3.3 MySQL / MariaDB
• TZQuery and TZReadOnlyQuery now support the use of multiple
statements in the query. The first result that is returned by the server
will be the result that gets loaded into the Dataset.

• The MySQL driver should now be thread safe. This still means that
threads are not allowed to share a connection.

• New connection level parameter MySQL_FieldType_Bit_1_IsBoolean.


If this parameter is enabled (set to 1/Yes/True), fields declared as
BIT(1) will be treated as boolean fields. The old assumption that an
enum(’Y’,’N’) is a boolean field is disabled if this parameter is enabled.
If this parameter is enabled, enum(’Y’,’N’) will be a string field. Other
enums behave as before, they will be mapped to a sting filed in any
case. This parameter will be enabled by default in Zeos 8.0 if the server
version is >= 5.0.3.

• Using date and time format settings with MySQL is now supported.
This can be used if the parameter preferprepared is disabled (default
setting). In this mode Zeos sends date and time paramaters to the
server as strings. Problems with formatting can arise. If you have
problems, try changing the date and time format settings. For more
information see 6.1.2 Date and Time format settings, Page 22.

• The MySQL driver will not automatically connect to the database when
the DBC layer connection object is created anymore. This only affects
users of the DBC layer.

6.3.4 MS SQL / SAP ASE (Sybase ASE)


• We reenabled Sybase support. This should allow some basic usage, but
your mileage may vary. If you have problems please get in contact.

• The driver now supports GUID-Columns on MS SQL Server.

• We enabled support of TDS 5.0 for newer Sybase Servers.

• With FreeTDS the server port can now be specified.

• The FreeTDS drivers now uses sybdb.dll as the default dll to load.
Watch out if your program doesn’t set the LibraryPath property in
TZConnection.

28
• Using date and time format settings with Microsoft SQL Server and
SAP Adaptive Server Enterprise is now supported. Since Zeos sends
date and time paramaters to the server as strings, problems with for-
matting can arise. If you have problems, try changing the date and
time format settings. For more information see 6.1.2 Date and Time
format settings, Page 22.

• If you still use the mssql protocol using ntwdblib.dll to connect to MS


SQL Server, we urge you to move on to either use ADO or FreeTDS.
The mssql protocol using ntwdblib.dll is not supported by Microsoft
for ages now and we will discontinue its support with Zeos 8.0.

6.3.5 Oracle
• Performance improvement: The oracle driver now supports block cur-
sor reads. This allows to fetch more than one record in one net-
work roundtrip. The parameter for setting the block size is inter-
nal_buffer_size.

• We added support for the new DBC layer batch loading API to the
Oracle driver. For more information see 6.1.3 Batch Loading, Page 23.

6.3.6 ADO
• The ADO driver now also supports Free Pascal.

• We added support for the new DBC layer batch loading API to the
ADO driver. For more information see 6.1.3 Batch Loading, Page 23.

• Zeos emulates named parameters for ADO drivers that don’t support
parameters. Unfortunately this means Zeos doesn’t know how to cor-
rectly format timestamps and similar data types to be correctly recog-
nized by the underlying database. Please use the new connection pa-
rameters ReadFormatSettings, WriteFormatSettings, DisplayFormat-
Settings. For more information see 6.1.2 Date and Time format set-
tings, Page 22.

• The ADO driver will not automatically connect to the database when
the DBC layer connection object is created anymore. This only affects
users of the DBC layer.

29
6.3.7 SQLite
• The SQLite driver will not automatically connect to the database when
the DBC layer connection object is created anymore. This only affects
users of the DBC layer.

30
Chapter 7

Known Problems

• Zeos doesn’t support autoincrement fields in Firebird. This has been


changed in the Zeos 8.0 version.

• Zeos currently doesn’t support the BCD type columns of Delphi. NU-
MERIC and DECIMAL columns still get mapped to floating point
types. This will be adressed in Zeos 8.0 because it requires a lot of
changes in the Zeos core.

• Zeos will usually agressively cache metadata of your database. Because


of this scenarios where your database structure is changing constantly,
are not well supported. You can call ZConncection.DbcConnection.-
GetMetadata.ClearCache to clear out the caches. You can also disable
the UseMetadata property of the TZConnection object. All data sets
will become readonly in that case. Use TZUpdateSQL if you need them
to be writable again.

• As soon as you touch a blob field for reading, Zeos will fetch the whole
blob contents from the database server. This may lead to high memory
consumption.

31
Chapter 8

The future development of Zeos

The next version of Zeos will be Zeos 8.0 which currently is in its Beta state.
Currently the following changes and features are planned:

• support for OLEDB

• support for ODBC

• support for BCD type columns to allow correct usage of NUMERIC


and DECIMAL fields

• support for GUID type columns in Firebird

• Interbase 5 will not be supported officially anymore

• PostgreSQL 7 databases will not be supported officially anymore

• The mssql protocol that uses ntwdblib.dll will not be supported any-
more. With Zeos 8.0 there will be plenty of other options to connect
to Microsoft SQL Server.

• DBC layer: the use of TZDriverManager.Connect will not be supported


with a string anymore, only the use of a TZURL object will be sup-
ported.

• Protocols with version numbers will not be used in Zeos 8.0 anymore
(i.e. firebird-2.5 will become firebird). Please migrate. Driver names
without version numbers were added to Zeos 7.2 to prepare for this.

• Zeos 8.0 will have support for the Delphi Nextgen compilers - i.e. An-
droid, iOS, MacOS X and Linux.

32
If you use any of these new features, please get in contact on the forums
(http://zeoslib.sourceforge.net). We like to read about success stories
as well as about problems.

33

You might also like