Menu

#41 Insert/Update with returning postgres

open
nobody
None
2022-03-03
2022-03-02
Douglas
No

zeos 7.2.14-release, postgresql 12
I can't run (in postgresql):
qry1.Close;
qry1.SQL.Clear;
qry1.SQL.Add('INSERT INTO TEST');
qry1.SQL.Add('(NAME)');
qry1.SQL.Add('VALUES');
qry1.SQL.Add('(:NAME)');
qry1.SQL.Add('RETURNING ID);
qry1.ParamByName('NAME').AsString := 'NAME XXX';
qry1.Open;
myString := qry.Fields[0].AsString;
Except: can not open a Resultset

in firebird it works very well.

Discussion

  • marsupilami79

    marsupilami79 - 2022-03-03

    Hello Douglas,

    this might be a limitation of the PostgreSQL driver in Zeos 7.2. Could you please check the 8.0 version from SVN?

    best regards,

    Jan

     
    • Douglas

      Douglas - 2022-03-03

      I got it using
      protocol = postgresql-9
      and libpq-10.dll

       

Log in to post a comment.