System.DllNotFoundException: Unable to load DLL 'sni.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)

@Povilas_Jonikas,

May be we should be updating the code also like this?

Using connection As New Microsoft.Data.SqlClient.SqlConnection(connectionString)
    connection.Open()
    Using bulkCopy As New Microsoft.Data.SqlClient.SqlBulkCopy(connection)
        bulkCopy.DestinationTableName = tableName

        Try
            bulkCopy.BulkCopyTimeout = 60 
            bulkCopy.WriteToServer(dataTable)
        Catch ex As Exception
            out_ExceptionMessage = ex.Message 
            Throw
        End Try
    End Using
End Using

Thanks,
Ashok :slight_smile:

1 Like