getting last record id of inserted record

sbkcnftwug

New Member
I want to use findbyvalue to select the last entered record automatically in a drop down box after it has been inserted, how would I get that id of the record JUST inserted?<BR><BR>ThanksIf you're using SQL2k you can do the following ...<BR><BR>SELECT @IDENT_CURRENT('tablename')<BR><BR>which will spit back that last inserted identity of the chosen table. <BR><BR>If you're not using SQL2k, but are using SQL7 then you can SELECT @@IDENTITY but that gives you the last identity ever regardless of table name. <BR><BR>])ryunfortunatly it's ms accessCheck out FAQ in the Databases, General category. Toward the bottom.
 
Back
Top