Hi all,
When I insert a record into mysql table I want to obtain the LastAutoIncrement ID, how do i do this in JSP. I have tried this.
INSERT INTO formula (Formula_Code, Formula_Name) VALUES ('Test2','Test Formula2')
Select LAST_INSERT_ID();
If I used those two statement in one line I got the error say that I have access violation problem. If i used those two statements in two separate sql then I got this error.
Select LAST_INSERT_ID()
: Results returned for UPDATE ONLY.
: Results returned for UPDATE ONLY.
Can anyone help me out.
Thanks,
Duc
Chat with friends online, try MSN Messenger: Click Here
=========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
