How to close a connection with a firebird database

后端 未结 1 1613
别那么骄傲
别那么骄傲 2021-01-24 02:25

I\'m developing a project using asp.net c# webforms framework 4.5, and I did a connection test on Firebird database, but when I close this connection it isn\'t closing, I used t

相关标签:
1条回答
  • 2021-01-24 03:15

    The Firebird .NET provider has a built-in connection pool and it is enabled by default. You can add Pooling=false to the connection string to disable it. However in a lot of cases a connection pool is a good thing (it saves the time of having to open a connection), so make sure you really need to disable it.

    Calling FbConnection.ClearPool(connection) or FbConnection.ClearAllPools() should close currently open connections in the pool.

    Also make sure you start a new transaction when querying MON$ATTACHMENTS. The content of monitoring tables is 'frozen' inside a single transaction.

    0 讨论(0)
提交回复
热议问题