Could you help me with this error?
I have a database in sql developer, I have created it with a table that includes users and passwords. Create a program with a login, I have programmed the button, I have created my connection class and I have imported the jdbc library.
// this is my connection class, yes, apparently if it is denoted that not and imported the jdbc but I have done it. Thank you for your answers. and sorry for the inconvenience ...
public class Conexion { public String user="sa"; public String password="123"; // public String url="jdbc: sqldeveloper: // localhost: 1521; databaseName = xe";
public Connection conection =null;
public Statement state = null;
public Statement Conectar ()
{
try
{
Connection cn = DriverManager.getConnection(url,user,password) ;
cn.close();
state = conection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY );
}
catch (SQLException e)
{
JOptionPane.showMessageDialog(null, e);
}
return state;
}