Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CachedRowSet.next() problem. Using mysql.

843859Aug 28 2006 — edited Aug 28 2006
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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 25 2006
Added on Aug 28 2006
2 comments
56 views