Then you have the database set up very strictly. Just don't close the connection and reuse it. If you don't use multiple threads, it'll be fine. If you do use multiple threads, then simply dedicate one thread to operate on the database and pass all database requests from other threads to the dedicated one.
Bookmarks