On Thu, Nov 13, 2014 at 11:07 AM, Reimar Grabowski <reimg...@web.de> wrote: > Hi, > > first of all I am new to using Lazarus/FPC for database communication. > I have set up my database connection, transaction and queries via the Object > Inspector and all is working as it should. But I have a little problem > getting the PK value of a newly inserted record (the PK field is an > auto-incremented one). > Actually it's not really a problem, I just don't like the way I do it and > found no better one. > > [snip] >
Hi, Take a look in Greyhound project: https://github.com/mdbs99/Greyhound Here you can see an example using "last id": https://github.com/mdbs99/Greyhound/blob/master/test/ghsqltest.pas#L285 Regards, Marcos Douglas -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus