Hello,
I'm trying to retrieve the results of a database query using a CachedRowSet but the next() function doenst resolve for me.
I'm using intellij with sun java 1.5.0.06 and mysql-connector-java-3.1.12-bin.jar.
I've also tried mysql-connector-java-5.0.3-bin.jar but get the same problem.
Here is the code snippet:
CachedRowSet crs = LinkerAdapterMySQL.getInstance().getData( "SELECT * FROM restype WHERE 1" );
Vector<String> resTypes = new Vector<String>();
while( crs.next() )
{
try{
resTypes.add( crs.getString( "resType" ) );
} catch( java.sql.SQLException e )
{
System.err.println( e.toString() );
}
}
When i try to build the project i get this error at the line "while( crs.next() )":
illegal start of type.
Any ideas what's going on?
thanks.