aspose file tools*
The moose likes JDBC and the fly likes Sql Result set processing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Sql Result set processing" Watch "Sql Result set processing" New topic
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: 61654
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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