I am having a problem releasing the connection to an attached SQL Express database file. When I run the 1st query against the database, NHibernate opens the connection. There is another spot in the system where users have the option of encrypting the database mdf and ldf files so they can be sent to another company for validation. Unfortunately, that portion will not work because NHibernate is not releasing the connection to the database. I've tried the following statements but nothing seems to solve the problem:
Session.Connection.Close();
Session.Disconnect();
Session.Close();
Session.Dispose();
What do I have to do in order to get NHibernate to release its exclusive usage lock on that mdf file?
|