File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes PreparedStatement error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "PreparedStatement error" Watch "PreparedStatement error" New topic

PreparedStatement error

shaf maff
Ranch Hand

Joined: Sep 07, 2008
Posts: 180
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

Joined: Sep 07, 2008
Posts: 180
Ah, I fixed it. It should have been:

Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
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.
I agree. Here's the link:
subject: PreparedStatement error
It's not a secret anymore!