I am working on a swing project. In which i am using jdbc odbc Connection bridge to access the data from SQL database. I am using the following code
try
{
Class.forName("sun.jdbc.odbc.JdbcodbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:dsn");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from temp");
int count c=0;
while(rs.next())
{
c++;
}
}
catch(Exception ex)
{
ex.printStackTrace();
}
In the above code after while loop, if i use again the result set object then it throws the exception as result set is closed . Is there any other object instead of result set to fetch the data from database in disconnected mode.