If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Return ID # number after insert

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-09-04, 10:49
jpws6 jpws6 is offline
Registered User
 
Join Date: Mar 2004
Posts: 6
Return ID # number after insert

What is the best way to do this? I have a form that a user submits to my oracle database, a trigger assigns the data an ID # and then I want to return the ID # to the user and am not sure how to go about this. I was going to use a recordset with the ID #'s and just display the last number, but quickly found out that will not work since the values are not inserted in order in the database among other reasons.
Reply With Quote
  #2 (permalink)  
Old 03-10-04, 19:43
jpws6 jpws6 is offline
Registered User
 
Join Date: Mar 2004
Posts: 6
Any suggestions?
Reply With Quote
  #3 (permalink)  
Old 03-11-04, 00:12
yoja7 yoja7 is offline
Registered User
 
Join Date: Jan 2004
Location: India
Posts: 31
hi

try using CURRVAL

or search gogle for oracle and currval
__________________
Do not walk behind me, for I may not lead.
Do not walk ahead of me, for I may not follow.
Do not walk beside me, either.
Just leave me alone.

Yogesh Jangam
http://yogeshjangam.*************
Reply With Quote
  #4 (permalink)  
Old 03-12-04, 01:46
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
4GuysFromRolla.com : ASP FAQS : Databases, General
How do I get the record number of a just added record, using an Access database table? by Bill Wilkinson - 11/3/2000
http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=79

ADO FAQ - Q9) How do I get the AutoNumber (or Identity) for a newly inserted record?
http://www.able-consulting.com/ADO_Faq.htm#Q9

INFO: Identity and Auto-Increment Fields in ADO 2.1 and Beyond
http://support.microsoft.com/support.../q233/2/99.ASP
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On