Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PreparedStatement error

 
shaf maff
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys

The compiler keeps giving me an error about my preparedstatment, I have spent to laast 15/20min trying to workout exactly what went wrong to no avail. Hopefuly someone here will beable to point me in the right direction:

PreparedStatement preparedStatement = null;
preparedStatement = connection.preparedStatement(SQL_CREATE_NEW_MAIL);



 
shaf maff
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, I fixed it. It should have been:

connection.prepareStatement(SQL_CREATE_NEW_MAIL);
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad you fixed it.

For what it´s worth, using an IDE and reading the API docs would have helped a lot in solving the problem sooner.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic