0
Good afternoon
I’m using Delphi 7 with ZEOS.
I need to create a connection in RUN TIME.
I’m trying to use the following code
Var
Connection : TZConnection;
begin
Connection:= TZConnection.Create(Nil);
Connection.HostName:= '127.0.0.1';
Connection.Database:= 'RMS';
Connection.Password:= '1111';
Connection.User:= 'root';
Connection.Port:= 3306;
Connection.Protocol:= 'mysql-4.1';
Connection.LoginPrompt:= False;
Connection.TransactIsolationLevel:= tiReadCommitted;
But for some reason the line
Connection.Transactisolationlevel:= tiReadCommitted;
is returning me the following error
[Error] Unit1.pas(719): Incompatible types: 'Tztransactisolationlevel' and 'Ttransisolation'
My question is..:
I have to declare something in USES to be able to SETAR Connection.Transactisolationlevel via programming or
via programming really does not set this property??
In project time I can connect and change the above property normally.
Hugs and thanks to all for your attention.
Anything you do via design, you can do via code. The message is clear, he is expecting one type of data and is receiving another, even passing the correct enumerate to the property. So come on, I suggest giving a "Ctrl+Click" on the tiReadCommitted and see where he’s getting this value, see if he’s sending it to the correct statement of the Zeoslib fonts and if the source is in the expected path. The version I use of zeos is in the Zdbcintfs font, declared as a Tztransactisolationlevel, which is the same type expected by the Transactisolationlevel property
– Confundir
@Confuse Good afternoon.. Man you were good.. Just declared to Unit Zdbcintfs that the stop worked.. The "Ctrl + Click" from the beginning was sending me to Dbtables, so it didn’t work... Fight for attention.. : ) Hugs
– Ricardo M.Souza