is there a "last id" mechanism on an update?
I have a gridview "new" command that insert a new row into a postgresql
database.that uses the odbc driver.
Newbie as I am i thought that iReturn would have the new index that was
created.
SqlDS1.InsertCommand = "INSERT INTO \"Algorithms\" (source_code_id, comment
VALUES (69, 'haleys comet', 1)";
int iResult = SqlDS_Algorithms.Insert();
Ok, instead of getting back an id I got back a "1" which just indicates the
command ran ok. Looking at the database I see the new id value and it is
318. Is there some mechanism I can use to obtain the index value that was
autogenerated?
googleing around I see where some people are writing stored procedures and I
see one here:
http://www.thescripts.com/forum/thread173510.html
Was just wondering if the is a way to use the gridview or sqldataset1
control to get that index value and avoid writing a stored procedure.
...thanks..
--
======================================================================
Joseph "Beemer Biker" Stateson
http://ResearchRiders.org Ask about my 99'R1100RT
======================================================================
Date:Mon, 14 May 2007 18:35:30 -0500
Author:
|