I am using the ucanaccess tool to interact with my access database, but I do not know how to display or store the resulting ResultSets as Strings.
Edit: I have tried =System.out.println(resultSetId.getString(1));
but that only returns errors.
ResultSet resultSetId;
String msAccDB = "D://Computer Science//passManager//src//Manager.accdb";
String dbURL = "jdbc:ucanaccess://" + msAccDB;
connection = DriverManager.getConnection(dbURL);
statement = connection.createStatement();
resultSetId = statement.executeQuery("SELECT ID FROM Passwords WHERE ID =
\""+identifier+"\";");
System.out.println(resultSetId.getString(1));
Gives the error Exception in thread "main" net.ucanaccess.jdbc.Ucanaccess
enter code hereSQLException: invalid cursor state: identifier cursor not positioned on row in UPDATE, DELETE, SET, or GET statement: ; ResultSet is positioned before first row
Edit: Adding the .next() fixed it, thanks!