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

Specify timeout for .CrossApplySqlServerQuery and .ToSqlCommand #463

Open
mickvikt opened this issue Jul 3, 2023 · 3 comments
Open

Specify timeout for .CrossApplySqlServerQuery and .ToSqlCommand #463

mickvikt opened this issue Jul 3, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@mickvikt
Copy link

mickvikt commented Jul 3, 2023

Is there a way to specify the SQL command execution timeout for .CrossApplySqlServerQuery and .ToSqlCommand?
I'm trying to run a stored proc using .CrossApplySqlServerQuery and consume the result set that it returns and it fails me with a timeout.

As I found out by googling, default CommandTimeout for SqlConnection and OdbcConnection is 30 seconds which is not enough.

Is there a way to go around this? How do you solve this in your production environments, because I suspect not all queries/stored proc calls can be completed in under 30 seconds.

@paillave
Copy link
Owner

paillave commented Jul 4, 2023

very soon, a new realease will be done containing improvments for Oledb and Odbc.
In the meantime, can you see if you can set this timeout in the connection string? (I believe it may be possible)

@paillave paillave self-assigned this Jul 4, 2023
@paillave paillave added the enhancement New feature or request label Jul 4, 2023
@mickvikt
Copy link
Author

mickvikt commented Jul 4, 2023 via email

@paillave
Copy link
Owner

paillave commented Jul 4, 2023

Indeed, I mixed with the connection timeout.

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

No branches or pull requests

2 participants