-
Notifications
You must be signed in to change notification settings - Fork 140
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
Can't execute command when connection has never been opened #584
Comments
Add this to your connection string.
|
Has there been any movement on or confirmation of this bug? We are experiencing the same issue, but always after one succesful query...
|
hello and thank you for raising this issue, also apologies for the long period without response. we'll take a look |
this issue seems to be related to some connection pool errors which were there indeed with earlier driver versions like 2.0.17 but in the latest one 2.0.25 this should be fixed. Please upgrade to the latest driver and retest - let us know if you still see the same error. Probably we'll require you to share the debug logs with the reproduction as well. |
This is still happening with the Snowflake.Data nuget package 2.1.3. |
since we couldn't reproduce it even with 2.0.25 (after all the connection pool fixes), if the issue still occurs for you guys, can someone who still has this issue with the latest Snowflake driver please open a new issue in this repo with a reproducible code example ? Thank you in advance ! |
Issue description
We are getting this error on production code with the exception message "Can't execute a command when the connection has never been opened", I have no clue why the SFSession state is null.
Situation
We have a different repository for create, update and delete, and for every method execution, we create a connection execute the query and close the connection.
Locally we never have this issue only in production code.
Example code
Error log
There is an example in READMD.md file showing you how to enable logging.
Configuration
Driver version:
2.17.0
Dotnet framework and version: E.g. .net framework 4.5.2 or .net standard 2.0
.net 6.0
Server version:
7.2.0
Client OS:
Linux container mcr.microsoft.com/dotnet/aspnet:6.0
The text was updated successfully, but these errors were encountered: