This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes COUNT+PSTMT error? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "COUNT+PSTMT error?" Watch "COUNT+PSTMT error?" New topic


sahar sa
Ranch Hand

Joined: Jul 06, 2009
Posts: 102
Im trying to find the count of rows who has Pmax . and I need to use PSTMT. but it throws me an error:
here is the code snippet:

here is the error:

do you know how can I declare this rowcount ?
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

No, but you do have to pass a String or int to the getInt() method. Stick some quotes round rowcount.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
sahar sa
Ranch Hand

Joined: Jul 06, 2009
Posts: 102
wooow! thank you friend!
now it works!
Don't get me started about those stupid light bulbs.
subject: COUNT+PSTMT error?
jQuery in Action, 3rd edition