Skip to content

Commit

Permalink
fixed NotSupportedException in WriteDataTableToDataConnection
Browse files Browse the repository at this point in the history
* fixed NotSupportedException on unnecessary call of AddMissingColumnsCommandText for NoDDL mode
  • Loading branch information
jochenwezel committed Mar 28, 2024
1 parent 428c17b commit 8c26930
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CompuMaster.Data/GlobalSuppressions.vb
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Imports System.Diagnostics.CodeAnalysis
<Assembly: SuppressMessage("Minor Code Smell", "S4136:Method overloads should be grouped together", Justification:="<Ausstehend>")>
<Assembly: SuppressMessage("CodeQuality", "IDE0079:Unnötige Unterdrückung entfernen", Justification:="<Ausstehend>")>
<Assembly: SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification:="<Ausstehend>")>
<Assembly: SuppressMessage("Maintainability", "CA1510:ArgumentNullException-Throw-Hilfsprogramm verwenden", Justification:="<Ausstehend>")>
9 changes: 6 additions & 3 deletions CompuMaster.Data/Manipulation.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Option Strict On

Imports System.Data
Imports System.Data.Common
Imports CompuMaster.Data.Strings

Namespace CompuMaster.Data
Expand Down Expand Up @@ -156,9 +157,11 @@ Namespace CompuMaster.Data
End If

'Extend schema if required
Dim extendSchemaCommandText As String = AddMissingColumnsCommandText(sourceTable, RemoteTable, ddlLanguage)
If extendSchemaCommandText <> Nothing Then
CompuMaster.Data.DataQuery.ExecuteNonQuery(dataConnection, extendSchemaCommandText, CommandType.Text, Nothing, CompuMaster.Data.DataQuery.Automations.None, 0)
If ddlLanguage <> DdlLanguage.NoDDL Then
Dim extendSchemaCommandText As String = AddMissingColumnsCommandText(sourceTable, RemoteTable, ddlLanguage)
If extendSchemaCommandText <> Nothing Then
CompuMaster.Data.DataQuery.ExecuteNonQuery(dataConnection, extendSchemaCommandText, CommandType.Text, Nothing, CompuMaster.Data.DataQuery.Automations.None, 0)
End If
End If
RemoteTable = LoadTableStructureWith1RowFromConnection(remoteTableName, dataConnection, False)

Expand Down

0 comments on commit 8c26930

Please sign in to comment.