hi
I want to wrap the access to a sqlite database in an object. So i can
create multiple instances of this wrapper with base code to get data
out of the sqlite database.
But i want to make the connection only onces when i create the first
instance. And when the program ends the connection should be removed.
ex.
wrapper objects
query wrapperQuery1 = new query(); // here the database should connect
query wrapperQuery2 = new query(); // connection should already exists
query wrapperQuery3 = new query(); // connection should already exists
wrapperQuery1.close(); // dbconnect stays open
wrapperQuery3.close(); // dbconnect stays open
wrapperQuery2.close(); // dbconnect should close now when.
How would i contruct this?