Incompatible types: 'TZConnection' and 'TZAbstractConnection'

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
Delphiwar99
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 13.02.2019, 02:59

Incompatible types: 'TZConnection' and 'TZAbstractConnection'

Post by Delphiwar99 »

I have the following funtion working in Delphi2010 with zeos 6.6.5

Code: Select all

function zIncCodeByYear
(zQry : TZquery; sCampo : string; iDigit : ShortInt = 8 ): String;
var
  zConLocal, zConOriginal : TZConnection;
begin
  bActive := zQry.Active;
  zConOriginal := zQry.Connection;
  ...
Now I'm migrating to Delphi Tokyo with zeos 7.2.4 and i get the followin error when i try to compile

[dcc32 Error] zeosfuncs.pas(267): E2010 Incompatible types: 'TZConnection' and 'TZAbstractConnection'
[dcc32 Fatal Error] Myfuncs.pas(162): F2063 Could not compile used unit 'zeosfuncs.pas'

Any Help?
Thanks!
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1999
Joined: 17.01.2011, 14:17

Re: Incompatible types: 'TZConnection' and 'TZAbstractConnection'

Post by marsupilami »

Hello and welcome to the Forums ;)

Please replace

Code: Select all

zConLocal, zConOriginal : TZConnection;
with

Code: Select all

zConLocal, zConOriginal : TZAbstractConnection;
With Zeos 7.0 a new connection type for a connection pool was introduced. Because of this the components now have properties of the type TZAbstractConnection instead of TZConnection.

Best regards,

Jan
Post Reply