Hi pls can someone help me solve a problem with the connection to a JDBC database?
I created a app with database connection and used the next code:
Connection conn = DriverManager.getConnection("jdbc:firebirdsql://localhost:3050/c:/service/db/service.fdb?encoding=ISO8859_1;autoReconnect=true&allowMultiQueries=true","sysdba","masterkey"); System.out.println("Conectat");
the code is ok but i need some solution to get the url(c:/service/db/service.fdb). Until now my solution is to try to find somehow to set a JLabel or TextField with that value of the url but this works until i
restart the app because after that the Label or the TextField is empty.
Is there a way to set a Label or TextField to get the string from a jfilechooser but to be permanent not to reset when i restart the app? The problem with this is that i need just once i want to use someting like this:
conn = DriverManager.getConnection("jdbc:firebirdsql://localhost:3050/"+path_db.getText()+"?encoding=ISO8859_1;autoReconnect=true&allowMultiQueries=true","sysdba","masterkey"); System.out.println("Conectat");
thanks in advance for answers