cannot resolve symbol-method getCount(java.sql.ResultSet)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sunitha_Lakkakula
Posted On:   Friday, December 7, 2001 03:05 AM

Sir, I have a program which uses ConnectionPooling.A method in my program is as below. public void updateSessionStats(UserCredentials credentials) throws SQLException { String sessionId = credentials.getSessionId(); String user = credentials.getUser(); Connection conn = connectionPool.getConnection(); Statement qs = conn.createStatement(); ResultSet rs = qs.executeQuery(SELECT_SESSION_STATS +QUOTE + sessionId + QUOTE + " and userid = " +QUOTE + user + QUOTE); if ( getCount(rs)>0 ) { java.util.Date dt = new java.util.Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss&q   More>>

Sir,

I have a program which uses ConnectionPooling.A method in my program is as below.




public void updateSessionStats(UserCredentials credentials) throws SQLException
{

String sessionId = credentials.getSessionId();

String user = credentials.getUser();

Connection conn = connectionPool.getConnection();

Statement qs = conn.createStatement();

ResultSet rs = qs.executeQuery(SELECT_SESSION_STATS +QUOTE + sessionId + QUOTE + " and userid = " +QUOTE + user + QUOTE);

if ( getCount(rs)>0 )
{

java.util.Date dt = new java.util.Date();

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

String ft = sdf.format(dt);

Statement us = conn.createStatement();

us.executeUpdate(UPDATE_SESSION_STATS +QUOTE + ft + QUOTE + COMMA +HITS_PLUS_QUALIFIER + QUOTE + sessionId + QUOTE);

}

connectionPool.close(conn);

}






But when I compile my program
I am getting the following error.


SessionManagerold.java:294: cannot resolve symbol


symbol : method getCount
(java.sql.ResultSet)


location: class login.SessionManagerold
if ( getCount(rs)>0 )



It is pointing out at getCount.


I have used getCount() in other method also where no error is shown.




I have even imported java.sql.ResultSet.




Could you please findout the reason and tell me as soon as possible.
I have wasted lot of my time for this and couldnt still get the answer.


Thank You.

   <<Less
About | Sitemap | Contact