Page 1 of 1

UniDataAdapter.UpdateBatchSize throws NotSupportedException

Posted: Fri 12 Jan 2018 10:10
by mloeffen
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?

Re: UniDataAdapter.UpdateBatchSize throws NotSupportedException

Posted: Mon 15 Jan 2018 12:57
by Pinturiccio
We have reproduced the issue. We will investigate it and post here about the results as soon as possible.

Re: UniDataAdapter.UpdateBatchSize throws NotSupportedException

Posted: Mon 05 Feb 2018 12:18
by mloeffen
Hi, is there any update on this issue that you can share?

Re: UniDataAdapter.UpdateBatchSize throws NotSupportedException

Posted: Thu 08 Feb 2018 16:24
by Pinturiccio
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.