Professional Documents
Culture Documents
Conectar Java Oracle
Conectar Java Oracle
import java.sql.*;
import javax.swing.*;
String lista_dados="";
while (resultset.next())
{
lista_dados = lista_dados + "Mat: "+resultset.getString("ra_mat");
lista_dados = lista_dados + "\nNome:
"+resultset.getString("ra_nome")+"\n";
}
JOptionPane.showMessageDialog(null, lista_dados);
}catch (ClassNotFoundException e) {
System.out.println("ClassNotFoundException" + e.getMessage());
} catch (SQLException e) {
System.out.println("SQLException" + e.getMessage());
} catch (Exception e) {
System.out.println("Exception = " + e.getMessage());
}
}