AdoNetCore.AseClient icon indicating copy to clipboard operation
AdoNetCore.AseClient copied to clipboard

The database connection was not released

Open aa126324 opened this issue 4 years ago • 1 comments

aseCommand.ExecuteReader( CommandBehavior.CloseConnection)
when aseDataReader closed,The database connection was not released version:0.19.1

aa126324 avatar Feb 21 '21 12:02 aa126324

Hello, I'm not sure to exactly understand what you mean by 'released' but if you mean that the connection should be closed, then it seems to be a misunderstanding of the responsabilities of the reader. It is only used to retrieve the response of a query to the Database. It is created from a command that itself is created from a connection. Thus you must close the connection 'yourself' by Disposing it (can be done automatically with a using statement upon instantiation).

However if it's not what you meant then could you provide more details on what you meant by 'not released' ?

Ju42 avatar Dec 08 '23 10:12 Ju42