Release Notes
Release Notes
14 Release Notes
Jan Baumgarten
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
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
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
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
1.1 General
5
Chapter 2
2.1 General
2.2 MariaDB
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.4 SQLite
2.5 ADO
7
Chapter 3
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
4.1 General
Zeos now implements additional sequence support for the following servers:
• Cubrid
• DB2
• Informix
• 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.2.1 Fixes
The following improvements were done for the MySQL / MariaDB driver:
• Zeos can now distinguish between MySQL and MariaDB. Users that
need this possibility, should check out TZMySQLDatabaseInfo.Get-
DatabaseProductName on the DBC layer.
10
4.3 PostgreSQL
4.4 SQLite
The sqlite driver now supports using wildcards in GetColumns. This im-
proves the possibilities for fetching metadata on table columns using TZSql-
Metadata.
11
documentation (https://www.sqlite.org/c3ref/enable_load_extension.
html, https://www.sqlite.org/c3ref/load_extension.html).
• 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.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.7 Oracle
13
Chapter 5
5.1 General
• 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”.
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
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.
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 firebird/interbase driver now can read the client library version of Fire-
bird 1.5+ and Interbase 7.0+.
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.
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
5.3 SQLite
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
• 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!
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.2 Changes
support for citext
21
Chapter 6
• 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:
• postgresql
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;
• 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.
25
www.postgresql.org/message-id/002701c49d7e%240f059240%24d604460a%
40zaphod.
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.
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 +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.
• 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.
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.
• 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.
• 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.
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 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.
• 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 next version of Zeos will be Zeos 8.0 which currently is in its Beta state.
Currently the following changes and features are planned:
• 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.
• 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