[asterisk-dev] func_odbc: Get the primary key for inserted row?
Kevin P. Fleming
kpfleming at digium.com
Wed Jul 20 15:02:34 CDT 2011
On 07/20/2011 12:17 PM, Tilghman Lesher wrote:
> I do not. Keep in mind that a database keeping an autogenerated row ID is
> pretty specific to MySQL (although as you noted, PostgreSQL does it, too,
> now). ODBC is an older standard that tends to match with capabilities in
> MS SQL Server, Sybase, Oracle, and DB2. Therefore, I'd be surprised to
> learn that ODBC has such a concept.
The way I've seen this done in the past (way past, like when I was an
Oracle user) was that the INSERT statement itself would return a
resultset, containing the generated IDs from the rows that were inserted.
--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list