-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 the System.Data.Odbc driver support async IO? #89526
Comments
Tagging subscribers to this area: @roji, @ajcvickers Issue DetailsDescriptionToday, System.Data.Odbc doesn't override async methods like This is of interest because ODBC can be used to query Apache Impala and Apache Hive from .NET using the ADO.NET framework. Reproduction Steps
Expected behaviorIt would be nice if this used async IO under the hood. [https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/asynchronous-execution-notification-method?view=sql-server-ver16](these docs) seem to suggest it is possible, but I'm not an Odbc expert... Actual behaviorFalls back to sync implementation. Regression?No Known WorkaroundsYou can force async execution using ConfigurationWindows + .NET 6 Other informationNo response
|
Tagging subscribers to this area: @roji, @ajcvickers Issue DetailsDescriptionToday, System.Data.Odbc doesn't override async methods like This is of interest because ODBC can be used to query Apache Impala and Apache Hive from .NET using the ADO.NET framework. Reproduction Steps
Expected behaviorIt would be nice if this used async IO under the hood. [https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/asynchronous-execution-notification-method?view=sql-server-ver16](these docs) seem to suggest it is possible, but I'm not an Odbc expert... Actual behaviorFalls back to sync implementation. Regression?No Known WorkaroundsYou can force async execution using ConfigurationWindows + .NET 6 Other informationNo response
|
@madelson this may be possible, but we'd have to do a thorough investigation to see if it can be well-supported on other platforms as well (Linux, Mac). Note also that the ODBC drivers themselves would obviously also need to support this. This may raise a thorny compatibility question: if System.Data.Odbc switches to using ODBC async APIs, what happens if a driver is in use which doesn't support async? We'd need to fully understand this to avoid people suddenly breaking. Overall, we haven't received any requests for ODBC async support over the years, so this hasn't been prioritized. For most cases where a managed .NET driver exists (ADO.NET), that's usually the preferred option anyway, and async tends to be supported in ADO.NET drivers. |
@roji It would be great if System.Data.Odbc supported async APIs. I'm using it with several databases where a native ADO.NET provider either doesn't exist or isn't available for .NET Core. |
Description
Today, System.Data.Odbc doesn't override async methods like
DbCommand.ExecuteNonQueryAsync(...)
, and as a result all execution is synchronous.This is of interest because ODBC can be used to query Apache Impala and Apache Hive from .NET using the ADO.NET framework.
Reproduction Steps
Expected behavior
It would be nice if this used async IO under the hood. [https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/asynchronous-execution-notification-method?view=sql-server-ver16](these docs) seem to suggest it is possible, but I'm not an Odbc expert...
Actual behavior
Falls back to sync implementation.
Regression?
No
Known Workarounds
You can force async execution using
Task.Run
, but this blocks a thread.Configuration
Windows + .NET 6
Other information
No response
The text was updated successfully, but these errors were encountered: