Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: Resultset problem


Message #1 by BIPIN MEHTA <bsm3477@y...> on Thu, 29 Mar 2001 21:59:23 -0800 (PST)
Hai friend


    I understand your problem.

please use the following code

ResultSet rs = stmt.executeQuery("select count(*)
from tableA");

rs.next();
int cnt=rs.getInt(1);
rs.close();
out.println("count="+cnt);

bye



--- BIPIN MEHTA <bsm3477@y...> wrote:
> 
>  hi all,
> 
>   I have the following situation,
> 
>   ResultSet rs = stmt.executeQuery("select count(*)
> from tableA");
> 
>   how do i put the count into a int variable after
> this ?
> 
>  thanks in advance.
> 
>  regards,
>  
>  Bipin Mehta.
>   
> 

  Return to Index