This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
Similar Threads
Web Service with build.xml
Strange Problem in Running Jar!
help !!
Exception: java.lang.ClassVersionError:
Transmogrify