I am using SQLite and JAVA.
I would like to know if its a good idea to make a singleton SQLite DB handler class. I have a normal SQLite DB handler class but I keep on running into NOT Closed DB or closed to early DB problems which I cant seem to figure out.
So I thought that I might have to make a singleton class and just open it on creation and close it on destruction. Also all DB Queries will go through this class that is always open. Why would this be a bad idea?
Side question...is it a great idea to keep a DB Connection open for as long as the program is running?
Thanks
Aucun commentaire:
Enregistrer un commentaire