Postgresql and sequence

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
namikgungor
Posts: 2
Joined: Wed 03 Jun 2009 18:08

Postgresql and sequence

Post by namikgungor » Wed 03 Jun 2009 19:52

Hello.
how can i obtain value for sequence field when i was insert a new record?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 04 Jun 2009 09:27

You can set the DMLRefresh property of TPgQuery to True. In this case the TPgQuery component uses an INSERT statement with the RETURNING clause. The field value in the dataset is filled automatically when you post a record.

Post Reply