UniDataAdapter.UpdateBatchSize throws NotSupportedException

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for universal data access
Post Reply
mloeffen
Posts: 2
Joined: Fri 06 Sep 2013 15:22

UniDataAdapter.UpdateBatchSize throws NotSupportedException

Post by mloeffen » Fri 12 Jan 2018 10:10

Whenever I call UniDataAdapter.UpdateBatchSize with a value other than 1, a NotSupportedException is thrown. This happens when connecting both to Sql Server and Oracle. I setup UniConnection to support both databases and code look similar to this:

Code: Select all

using (var conn = new UniConnection(universalConnectionString))
{
    conn.Open();
    ..... snip .....
    using (var adapter = new UniDataAdapter())
    {
        adapter.SelectCommand = selectCommand;
        adapter.InsertCommand = insertCommand;
        selectCommand.UpdatedRowSource = UpdateRowSource.None;
        insertCommand.UpdatedRowSource = UpdateRowSource.None;
        adapter.UpdateBatchSize = 20; // throws 'Specified method is not supported.' at System.Data.Common.DbDataAdapter.set_UpdateBatchSize(Int32 value)
Used connectionstrings:
Provider=SQL Server;Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=D:\Databases\Test.mdf;Integrated Security=True;
Provider=Oracle;Data source=TEST;User Id=TEST;Password=TEST;Unicode=true

Am I doing something wrong?

Pinturiccio
Devart Team
Posts: 2238
Joined: Wed 02 Nov 2011 09:44

Re: UniDataAdapter.UpdateBatchSize throws NotSupportedException

Post by Pinturiccio » Mon 15 Jan 2018 12:57

We have reproduced the issue. We will investigate it and post here about the results as soon as possible.

mloeffen
Posts: 2
Joined: Fri 06 Sep 2013 15:22

Re: UniDataAdapter.UpdateBatchSize throws NotSupportedException

Post by mloeffen » Mon 05 Feb 2018 12:18

Hi, is there any update on this issue that you can share?

Pinturiccio
Devart Team
Posts: 2238
Joined: Wed 02 Nov 2011 09:44

Re: UniDataAdapter.UpdateBatchSize throws NotSupportedException

Post by Pinturiccio » Thu 08 Feb 2018 16:24

We have fixed the bug with throwing System.NotSupportedException when a value is assigned to the UniDataAdapter.UpdateBatchSize property. We will post here when the corresponding build of dotConnect Universal is available for download.

Post Reply