Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    6

    Unanswered: 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.

  2. #2
    Join Date
    Mar 2004
    Posts
    6
    Any suggestions?

  3. #3
    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.blogspot.com

  4. #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •