[Lazarus] TSQLQuery: Getting autoincremented ID value after insert (MySQL)
Marcos Douglas
md at delfire.net
Fri Nov 14 15:01:51 CET 2014
On Fri, Nov 14, 2014 at 10:40 AM, Michael Van Canneyt
<michael at freepascal.org> wrote:
>
>
> On Fri, 14 Nov 2014, silvioprog wrote:
>
>> On Fri, Nov 14, 2014 at 10:15 AM, Michael Van Canneyt
>> <michael at freepascal.org> wrote:
>> [...]
>> Connections for databases that have lastinsertID you can call the
>> method created for this:
>>
>> Function GetInsertID: int64;
>>
>> There is a plan to let SQLDB retrieve the value of some fields fro
>> the DB, but it is not implemented
>> yet.
>>
>>
>> Awesome news! =)
>>
>> Some branch to follow this new implementations? (trunk?)
>
>
> It will be implemented in trunk.
If you do not put the value, automatically, on register that you
included... what the point?
IMHO this is not a general code. The user can implements the same but
he will need to put the value on record... manually.
The code I showed before works in any DMBS. Just test it.
Best regards,
Marcos Douglas
More information about the Lazarus
mailing list