Closed amaliatorre closed 2 years ago
SOLUCION
public static ResultSet getTablaClientes(int resultSetType, int resultSetConcurrency) { try {
PreparedStatement stmt =(PreparedStatement) conn.prepareStatement (DB_CLI_SELECT,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
//Statement stmt = conn.createStatement(resultSetType, resultSetConcurrency);
/*CONSULTA SQL --> db_cli_select = SELECT* FROM clientes*/
ResultSet rs = stmt.executeQuery(DB_CLI_SELECT);
return rs;
} catch (SQLException ex)
{
ex.printStackTrace();
return null;
}
}
https://www.arquitecturajava.com/jdbc-prepared-statement-y-su-manejo/ https://docs.oracle.com/javase/tutorial/jdbc/basics/prepared.html