Dear Michael,
as in my first post, if you create a table :
Code: Select all
CREATE TABLE log_attivita (
cd_log_attivita SERIAL NOT NULL,
cd_tipo_log VARCHAR(4) NOT NULL,
cd_stato_attivita VARCHAR(4) NOT NULL,
CONSTRAINT log_attivita_pk PRIMARY KEY (cd_log_attivita)
);
and you try to insert something like in my example, the RETURNING clause is not working, with the message "cd_log_attivita NOT FOUND" when you try to catch the result as in the line after the Execute
Code: Select all
with qryDummy do
begin
SQL.Text :=
'INSERT INTO log_attivita (cd_tipo_log, cd_stato_attivita) ' +
'VALUES (:cd_tipo_log, :cd_stato_attivita) ' +
'RETURNING cd_log_attivita ;';
ParamByName('cd_tipo_log').AsString := '*LOG';
ParamByName('cd_stato_attivita').AsString := '*ATT';
Execute;
result := FieldByName('cd_log_attivita').AsInteger; // this line!
end
It was not so difficult to test by Devart programmers... Anyway, in 8.4.1 this is broken.
In 8.4.2 it works but now I have problems in some other kind of SQL statements. Something seems to be related to SQL composed by hand (but working on 8.3.2). Now I'm converting to SQL composed with ParamByName statements but for the moment I consider to wait until some new version is released because this is not the only problem I got with 8.4. I'm investigating on this, but I've reverted to 8.3.2 because I must make my customers do their job without problems and I can't install/recompile/test and uninstall/install/recompile every time.
Regards.
Sergio