Meaningless Drivel is fun!
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 Building Microservices this week in the Design 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!
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: COUNT+PSTMT error?
It's not a secret anymore!