Common Issues With Using DB in Phat

There are common errors that are made when using the database (TPhDatabase) in Phat. This document attempts to outline those errors, explain why they are an issue, and tell what the (current) best way to solve these issues is.

Why should you care? Interacting with the database is special because you are interacting with a critical system. Most importantly, the database is needed during data-taking. If too many sessions or cursors are opened the database can reach a limit and deny access to other people trying to connect (including the DAQ). There is, currently, no simple way to set a priority for certain connections. This fact makes it critical that users properly open and close connections (especially when running a large number of batch jobs - such as in code used by data validation).

Issues: