List:MySQL++« Previous MessageNext Message »
From:Joel Fielder Date:February 1 2008 9:28am
Subject:RE: SSQLS and auto increment
View as plain text  
In the current release of MySQL++, Connection has a function insert_id
to get it:

http://tangentsoft.net/mysql++/doc/html/refman/classmysqlpp_1_1Connectio
n.html#a40

In the forthcoming release of v3, Query and SimpleResult both have
insert_id functions.  Query::insert_id does the actual request to the
database server (by delegating to dbdriver), but SimpleResult is
populated with it when you call Query::execute.

Version 3 release is imminent so I'd go for that if I were you.

If you can't use any of those, use the LAST_INSERT_ID() SQL function.

Joel

Thread
SSQLS and auto incrementAndrej van der Zee1 Feb
  • RE: SSQLS and auto incrementJoel Fielder1 Feb