[Lazarus] TSQLQuery: Getting autoincremented ID value after insert (MySQL)

Martin Schreiber mse00000 at gmail.com
Fri Nov 14 15:32:55 CET 2014


On Friday 14 November 2014 15:11:30 Michael Van Canneyt wrote:
>
> The idea is to add [pfRefresh] to providerflags.
> When doing an insert, the fields with this flag will be added to the
> RETURNING clause and used to update the buffer.
>
I suggest [pfRefreshInsert,pfRefreshUpdate] as in MSEgui. MSEgui (and AFAIK 
Zeos) also automatically updates a simple master key field by LASTINSERTID if 
the DB supports it.

Martin




More information about the Lazarus mailing list