This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
i have a page which puts five tabs on the body of a page each tab has a link to a different jsp page now what happens is first page is the one where i get a customer_id generated now when i click second tab and fill form and then on submitting i do a db insert using the customer_id from session .and so on continue with all tabs. Now my problem is suppose after going to fourth tab with all the db inserts user clicks the second tabs and change some info and submits now wat happens is another record is inserted how do i recognise whether i should be doing update now i tried out by first firing a select query using customer_id and if i get a count 0 then i will insert else i will update but now in a page there are 2 rows of records i can add more rows in that page now but how to recognise whether to do insert or update???
Another easy way is delete all records in the tab_table pertaining to the customer_id and insert current tab_set records.
Warning: If part of the primary key in tab_table has a sequence (say of integer) or auto incrment column value and this functionality is used frequently, the sequence value may exceed the maximum limit specified for the column in the database.