aspose file tools*
The moose likes JDBC and the fly likes PreparedStatement error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "PreparedStatement error" Watch "PreparedStatement error" New topic
Author

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:

connection.prepareStatement(SQL_CREATE_NEW_MAIL);
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: http://aspose.com/file-tools
 
subject: PreparedStatement error