-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Got "Specified parameter name 'Parameter1' is not valid." when doing batch update with SqlDataAdapter #26024
Comments
@xiaoyumu did it work ok on .NET Core 2.0? Can you please post minimal repro code? (to avoid confusion) |
@karelz Thanks for the reply, I've updated the description at above with full code (sorry about the code fragment earlier :) ). Yes, It fails always.
|
@keeratsingh, @afsanehr, @David-Engel could you please evaluate whether this is needed for 2.1? |
Hi @xiaoyumu, I am able to repro the issue. Will update you here with more progress. Thanks! |
@keeratsingh @saurabh500 do you consider it 2.2 only, or is it blocking 2.1? (I didn't see any explanation for the move to 2.2) |
Batch update was not promised for 2.1. The feature/customer request which brought this code over was satisfied and the customer who requested it is happy with the functionality (they are not using batch update) so this issue does not need to delay 2.1. |
Today i got the same problem. It does not seem to be resolve. |
@wengxk The fix only went into the master branch and was not ported to 2.x. The next scheduled release out of master is 3.0 which appears to be scheduled for Q1 2019: https://github.com/dotnet/core/blob/master/roadmap.md#upcoming-ship-dates |
Thx for fixing this one. The "4.7.0-preview" on Nuget includes these fixes. TinyORM will be coming to NetStandard2.0 with full batching support now. |
Same issue in .net framework 4.6.1 |
Hi guys,
I have recently using the
System.Data.SqlClient
of version4.5.0-preview2-26406-04
to test if the batch update is supported in the latest build (Accoding to (https://docs.microsoft.com/en-us/dotnet/api/system.data.common.dbdataadapter.updatebatchsize?view=netcore-2.1#System_Data_Common_DbDataAdapter_UpdateBatchSize)) But if I set theUpdateBatchSize
property of theSqlDataAdapter
to a value lager than 1, like 2 or 10, an exception will throw with following message and stack trace. If I disable batch update by set UpdateBatchSize to 1 or just leave it unset using its default value, the code works (but without batching).Exception:
Specified parameter name 'Parameter1' is not valid.
StackTrace:
The program is running at a Win10Pro box with Visual Studio 2017 Community Edition.
Microsoft Visual Studio Community 2017
Version 15.5.6
VisualStudio.15.Release/15.5.6+27130.2027
SDK: Microsoft.NETCore.App Version: 2.1.0-preview2-26406-04
Project Target Framework
Assuming that there is a SQL Server instance running at localhost with a database named
Demo
, and there is a table namedBatchDemoTable
.Here is the full code that always generates this exception, it basically trying to insert multiple entities into a table which I want to do it in batch.
The text was updated successfully, but these errors were encountered: