Hello,
This appears to be a bug with the Citadel database. The short-term workaround is to wait the extra minute before detaching the database. Shutting down the DSC Engine before attempting to detach the database should also work, if that is possible with your system.
Here�s a full explanation of the problem, if you�re interested. The Citadel database makes use of the Microsoft Desktop Engine (MSDE), a stripped-down version of SQL Server, to store alarm & event data. When you run the archive VI, the alarms are dumped into the Citadel database as raw binary data. This is very quick, which is why the status bar appears to be lying to you. The Citadel service then works in background to format the alarms into the MSDE tables, using a standard ADO connection
to talk with the MSDE server. When you try to detach the database, we close that ADO connection, but, as I�ve discovered today, ADO does not really close the connection immediately, but rather caches it in some sort of connection pool for later use. Now, if, as is often the case, that was our only open ADO connection, Citadel would cleanup its ADO resources which would close the connection for real, but, if the DSC Engine is still actively logging alarms, ADO stays open to handle the alarms from that database, and the connection does not get closed until some timeout occurs in the guts of ADO to flush the connection from the connection pool.
I have not been able to find a system setting which will disable ADO�s connection pooling. I will continue to investigate a more permanent solution to this issue, at which point a knowledgebase document will be added to this site.
J.D. Robertson
Software Engineer
National Instruments