Forums
This topic is locked
ID of Last Inserted Record
Posted 12 Nov 2001 15:36:04
1
has voted
12 Nov 2001 15:36:04 niraj sharma posted:
How do I get the ID value of a record I just inserted into a form.What I want to do is use this ID with a URL in an email that goes
out right after the record is successfully inserted into the SQL
database.
Thanks
Replies
Replied 13 Nov 2001 09:45:03
13 Nov 2001 09:45:03 Viktor Farcic replied:
After inserting data into DB pass them to next page (there are tutorial on this site about passing values from insert/update to next page). On second page sort recordset by identifier desceding (SORT BY ID DESC) and filter with some value (let's say username). In this case I would get last value inserted by specific user. Once table is filtered it's piece of cake to get ID.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
How do I get the ID value of a record I just inserted into a form.
What I want to do is use this ID with a URL in an email that goes
out right after the record is successfully inserted into the SQL
database.
Thanks
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Edited by - vfarcic on 11/13/2001 09:46:53
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
How do I get the ID value of a record I just inserted into a form.
What I want to do is use this ID with a URL in an email that goes
out right after the record is successfully inserted into the SQL
database.
Thanks
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Edited by - vfarcic on 11/13/2001 09:46:53