Hello, I have a class that allows me to establish a connection with a data base and I have other classes singleton that uses the first that I described obtaining a connection. By each method in which I use the connection, first I open the data base, I use it and thenI close it.
Something like this:
Connection conn = new Connection ();
conn.openBase();
.............. something of code.......
conn.close();
This works, simply I want to know if it is correct to do it in this way, or if it is possible to improved it.
Daniel 