Insert-Retrieve Autonumber in Ms Access using JSP

Discussion in 'JSP' started by sriram225, Jun 4, 2009.

  1. sriram225

    sriram225 New Member

    Joined:
    May 22, 2009
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    My Db SChema...

    When i Insert a record how can i write my query ???
    insert into table_name (ser_no,name) values('','jagadesh');
    but this is not working....and after inserting succesfully i have to print AUTONUMBER (Retrieving) for correspoding record inserted !!??

    Any Help Would be Greatly Appreciated Thank You!!!!
     
  2. gkumar

    gkumar New Member

    Joined:
    Jun 16, 2009
    Messages:
    58
    Likes Received:
    5
    Trophy Points:
    0
    Please cut out that excessive use of dots, exclamation, question marks and Advertisement Like Words. You now look like an annoying little yelling child. Please don't do that. Please come over as a professional, try to ask questions the smart way.

    With regard to your problem, use Statement#getGeneratedKeys().
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice