Your best bet would be to submit the data to the database, and return the newly
created ID by
using a stored proc to insert the data and then return back the NEW ID
---------------------------------------------------------------
Create Proc dbo.sp_insertData
@somedata varchar(25),
@SomeMoreData Varchar(25)
As
Insert (field1, field2)
Values( @Somedata, @Somemoredata)
Into Sometable
Return @@Identity
----------------------------------------------------------------
George Oakes
VB.Net Programmer/Analyst
Morgan Tire & Auto
dba. Tires Plus, Total Car Care
(727) 442-8388 ext. 2374
(800) 269-4424 Toll Free
[EMAIL PROTECTED]
-----Original Message-----
From: sas0riza [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 14, 2004 7:52 AM
To: [EMAIL PROTECTED]
Subject: [AspNetAnyQuestionIsOk] Displaying the Last Inserted Record
After user fills in a form and hits submit, the data is entered into
the database. *I also want to retrieve that same record (last
entered record) and redisplay the info to the user letting him/her
know that that info has been entered.*
I'm not sure how to retrieve the last record. Do I need to loop
through a table or?
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=1293vlnut/M=295196.4901138.6071305.3001176/D=groups/S=1705006764:HM/EXP=1095249162/A=2128215/R=0/SIG=10se96mf6/*http://companion.yahoo.com>
click here
<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=:HM/A=2128215/rand=284720340>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/