[Lazarus] TSQLQuery: Getting autoincremented ID value after insert (MySQL)
Michael Van Canneyt
michael at freepascal.org
Fri Nov 14 15:39:01 CET 2014
On Fri, 14 Nov 2014, Martin Schreiber wrote:
> 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.
No problem.
I didn't know MSEGui has it, and the idea to use 2 different flags for insert/update is good :)
Michael.
More information about the Lazarus
mailing list