I am new to
To solve this problem, you must ensure that the data you get from the ResultSet is not null when you enter it into the datos2[i]
array:
while (rs.next()) {
datos2[i] = rs.getString("Descripcion").toString();
i++;
datos2[i] = rs.getString("Precio").toString();
i++;
datos2[i] = rs.getString("NombreCliente").toString();
i++;
datos2[i] = rs.getString("Fecha").toString();
i++;
}
When trying to display the data on the screen through the adapter, find some null value for that reason you can see some rows but it closes when finding a null value.