Brandon: With regards to Oracle Accessing Sequence will work if you make sure the Sequence is SELECTED within your session otherwise you should use <SEQ>.nextval to ensure you get a unique and valid value for your sequence for details Please read http://www.orafaq.net/usenet/comp.databases.oracle.tools/1999/12/11/0592.htm As with all things try the Statements in TOAD or SQLPlus environment first.. (My apologies for this OT discussion)
Keep me apprised of your progress, Martin- 617-852-7822 ----- Original Message ----- From: "Kwok Peng Tuck" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org> Sent: Monday, January 31, 2005 7:57 AM Subject: Re: Another ODBC OT Question > Depends on your database. Most db's like MaxDB, Oracle and so on which > support sequences can retreive the current value of the sequence after > it has been used. > Usually something along the lines of <SEQ>.CURRVAL for Oracle. Typically > you can only use it if you've used the sequence in the first place > (can't remember if true or not). > Not sure if MySQL can do that. > HIH. > > Brandon Mercer wrote: > > > Hello, > > Ok, I've got another off topic question :-P. That's two in a day! > > Three strikes and I'm out. lol Anyhow, I am inserting information > > into a database and I need to get the auto_increment value from my > > first insert and use the value it returns to create an entry in > > another table. Does anyone have a code snippet that they could show > > me? Thanks, > > Brandon > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]