This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I have a question. I have to insert 5 records in a database. I get the connection from datasource and create the preparedStatement. My question is, is it good to use one Connection and preparedStatement to insert all the 5 records or do I have to get the connection using ds.getConnection() and preparedStatement for each insert? Which one would be better in performance? Please note that I don't want to use executebatch() for this.