-
Notifications
You must be signed in to change notification settings - Fork 301
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
Bug in SqlCommand.ExecuteNonQueryAsync() #536
Comments
|
Sorry, seems I was a bit quick and typed the name of the wrong method. The problem is with The following code examples are shortened versions of code taken from an In the example below an exception is thrown stating that a task was cancelled:
If I do this instead it works as expected:
The method
|
We'll investigate and get back to you soon on this issue. |
Hi, I recently discovered the Microsoft.Data.SqlClient implementation and decided to test if this library has the same bug. The underlying problem seems to be the same: When calling |
Is there any progress on this one? |
Hi Christian, |
This is getting really weird. I copied the failing code into LinqPad to create a simple piece of code you could test, but so far I've been unable to reproduce the error in LinqPad. However, I still get the exception in the original codebase . In this case that's Essentially
The code is otherwise identical. It seems like it could be dependant on load, perhaps? Or maybe the database? How much data is in the table? Maybe it's different for a web project somehow? I'll keep trying to figure out the circumstances under which the error is triggered.
|
You may also take a glance at some of the open issues if they are related to what you are experiencing. |
Do you have any update on this issue? |
Yes -
The problem seemingly disappeared on its own. I haven't been able to figure out why - the exact same code that failed previously suddenly worked with no changes. This was true without updating the packages. I don't know if it was some weird condition on the server that caused it, or if it was something else, maybe a platform update.
Anyway, I am no longer able to reproduce, and I've actively tried to reproduce it. Previously I could reproduce at will.
Skaff deg Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Cheena Malhotra <notifications@github.com>
Sent: Wednesday, January 13, 2021 9:30:07 PM
To: dotnet/SqlClient <SqlClient@noreply.github.com>
Cc: Christian Ruud <cru@develop.no>; Mention <mention@noreply.github.com>
Subject: Re: [dotnet/SqlClient] Bug in SqlCommand.ExecuteNonQueryAsync() (#536)
@christian-ruud<https://github.com/christian-ruud>
Do you have any update on this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#536 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AO2MAHA4KPTDXXL3S6CY62LSZX7E7ANCNFSM4MO4X3AA>.
|
Closing as confirmed above. |
When calling
await command.ExecuteReturnValueAsync()
inside a using block I get an exception saying a task was cancelled.If I call
await Task.Delay(100)
before the end of the using scope, the call succeeds.Similarly, if the call is to a stored procedure with a return value, I get a
NullReferenceException
if I attempt to read the return value without delaying first.The text was updated successfully, but these errors were encountered: