This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
I'm writing a record to a table in a MySQL database. The field is set up to autoincrement. How do I handle this? When I write my PreparedStatement, do I include a placeholder? tableName.setInt(1,??? what do I put here? I don't know what this value will be?) Do I have to lock the table, get the highest value, increment by one, unlock the table, add my record (and hope nobody wrote a record between my unlock and my write)? Thanks, Pres