In a similar situation, if I recall correctly, we elected to open the database connection each time we needed it. Through testing we found that connection pooling in the the underlying infrastructure (windows, using oracle and ms sqlserver) worked well. The reconnection cost was usually trivial compared with the actual query especially if the connection was recently used; the resulting code was simpler/cleaner; and the approach seemed robust to lots of other reasons (not just idle time) that the connection might drop. I do recall that it was hard to test well.
Sam
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest