This week's book giveaway is in the Android forum. We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line! See this thread for details.
Are PreparedStatments scoped at the Connection level.
posted 15 years ago
If I do the following: PreparedStatement stmt1 = conn1.prepareStatement("INSERT INTO TABLEX VALUES (?,?,?)"; PreparedStatement stmt2 = conn2.prepareStatement("INSERT INTO TABLEX VALUES (?,?,?)"; and then create two threads where thread 1 uses stmt1 and thread 2 uses stmt2, should I expect this to work? Or will the threads interfere with one another when calling setXXX() methods and executeUpdate()?