Java and Databases help

Soldato
Joined
5 Dec 2003
Posts
2,716
Location
Glasgow
Hey I am trying to follow this tutorial here http://wiki.netbeans.org/AccessMssql to connect to a MS Access database with NetBeans but the code is not working, giving me a number of errors on compile that I don't have a great understanding of:

Code:
52: statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

Error: incompatible types, found: java.sql.Statement, required: java.beans.Statement

55: resultSet = statement.executeQuery(query);

63: options[i] = new Option(resultSet.getString("NAME"), resultSet.getString("NAME"));

These are the lines giving errors, the last two are cannot find symbol.

Can anyone advise me how to do this successfully in the latest NetBeans?
 
Thanks, line 63 is still throwing up an error though:

cannot find symbol
constructor Option(java.lang.String, java.lang.String)
location class javax.swing.text.html.Option
 
Yeah it says nothing to fix in imports.

I did know all this stuff but was about a year ago since I've looked at it, hoped I could follow this guide and get up to speed quick just to do a small project.

I have the "import javax.swing.text.html.Option;" in this time though.
 
Back
Top Bottom