| Author |
Sql Result set processing
|
Steve Sutton
Greenhorn
Joined: Aug 06, 2003
Posts: 7
|
|
|
I am using an SQL call to db2 to get the count(*) value from a query. I was going to use the getInt method to get the value of the count. I cannot use that method. I get the following error: The method getInt(int) from the type resultset is not static. What method should I use to get the value of the result? Since I am not returning a column value, I am unsure of what to use.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
We'll need to see your code, particularly in the area around the getInt() call (please be sure to use the UBB code tags). It looks like you are using getInt() in a static context, and it most certainly is not a static method. hth, bear
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Wayne L Johnson
Ranch Hand
Joined: Sep 03, 2003
Posts: 399
|
|
Make sure you are doing: and not something like:
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
|
Moving this to the JDBC forum...
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
Steve Sutton
Greenhorn
Joined: Aug 06, 2003
Posts: 7
|
|
Wayne, Thank you for helping out. I was doing it the way you said not to do it. Changed the code, works great! Thanks again.
|
 |
 |
|
|
subject: Sql Result set processing
|
|
|