Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The database connection was not released #207

Open
aa126324 opened this issue Feb 21, 2021 · 1 comment
Open

The database connection was not released #207

aa126324 opened this issue Feb 21, 2021 · 1 comment

Comments

@aa126324
Copy link

aa126324 commented Feb 21, 2021

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

@Ju42
Copy link

Ju42 commented Dec 8, 2023

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' ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants