Use TZMetaData to identify what type of field

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: Use TZMetaData to identify what type of field

Post by miab3 »

Hi Jan,

Of course you can test on Linux, maybe right away in the 21c Express Edition.

In fact, I hardly use Oracle, and my attention to the problem was that I came across it during testing.
I dealt with it temporarily by using the table names explicitly.

One more thing.
Note that the server can be on Linux and the client can be on Linux but also on Windows

Michał
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 796
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Use TZMetaData to identify what type of field

Post by aehimself »

marsupilami wrote: 30.01.2022, 12:38I changed the driver to return the CHAR_LENGTH value for string types in the COLUMN_SIZE column and to only use DATA_LENGTH for the CHAR_OCTETS_LENGTH column.
You da man, Jan. Yep, works like a charm, finally could get rid of my dummy query :)
marsupilami wrote: 30.01.2022, 12:38Opinions?
Yes, don't ever roll back this commit, please! :)

With all due seriousness, though...
marsupilami wrote: 30.01.2022, 12:38The current calculation only makes sense for IDEs that use ANSISTRING and not UNICODESTRING as their default string type...
This information is coming from the database, not the IDE. If I need the buffer size and I know all drivers return it as ANSI... I'll have no issues having a magic number multiplier hardcoded.
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Use TZMetaData to identify what type of field

Post by marsupilami »

aehimself wrote: 30.01.2022, 22:54
marsupilami wrote: 30.01.2022, 12:38The current calculation only makes sense for IDEs that use ANSISTRING and not UNICODESTRING as their default string type...
This information is coming from the database, not the IDE. If I need the buffer size and I know all drivers return it as ANSI... I'll have no issues having a magic number multiplier hardcoded.
That is the problem - they don't give consistent results currently ;)
Post Reply