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 COUNT+PSTMT error? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
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!
It is sorta covered in the JavaRanch Style Guide.
subject: COUNT+PSTMT error?
It's not a secret anymore!