|
|
От: |
Funny Rabbit
|
|
| Дата: | 06.10.25 13:53 | ||
| Оценка: | |||
String url = "jdbc:postgresql://localhost:5433/libra";
String user = "пользователь";
String password = "пароль";
try {
Connection connection = DriverManager.getConnection(url, user, password);
String query = "select value from light.t_weight_metrics";
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(query);
while(rs.next())
{
spinnerAdapter.add(rs.getString(0));
}
connection.close();
} catch (SQLException e) {
TextView t = (TextView)findViewById(R.id.etmErrors);
t.setText(e.toString());
}org.postgresql.util.PSQLException: Something unusual has occurred to cause the driver to fail. Please report this exception.