On Fri, Nov 14, 2014 at 10:05 AM, Reimar Grabowski <reimg...@web.de> wrote: > On Thu, 13 Nov 2014 13:26:32 -0300 > Marcos Douglas <m...@delfire.net> wrote: > >> Hi, >> Take a look in Greyhound project: https://github.com/mdbs99/Greyhound > I did and could not see how it helps.
It has a code that working with auto-inc. >> Here you can see an example using "last id": >> https://github.com/mdbs99/Greyhound/blob/master/test/ghsqltest.pas#L285 > Yes, if you are using Greyhound, which I am not. Yes, I use everyday. I'm the author. ;-) > So it looks like there's nothing in TSQLQuery that does the job for me. > I now just use another TSQLQuery with the following SQL: > > SELECT LAST_INSERT_ID() AS SomeNameIChoose; > > Seems to work well, reduces the lines of code as I don't have to set > parameters (my primary goal), can be reused for other inserts (being not > table dependent) and took about 1 Minute to implement. > > Thanks anyways. Best regards, Marcos Douglas -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus