Debug the code and you may receive the above exception in the function :
The reason for the exception was that the version independent COM ProgID was not registered to point to the latest version, so loading of OLEDB SOURCE connection manager threw above error The code is using version independent ProgIDs:
"DTSAdapter.OleDbSource" & "DTSAdapter.OleDbDestination".The COM spec says, the version independent ProgIDs should always load the latest version. But these ProgIDs are not registered.
As workaround, modify the ProgIDs to the names of SSIS 2016 IDs and use version specific ProgIDs. wiz.
DTSAdapter.OleDbSource.5 & DTSAdapter.OleDbDestination.5 rather than DTSAdapter.OleDbSource & DTSAdapter.OleDbDestination in the above code sample.
You may find the information of these ProgIDs from the System registry.
The ProgID "DTSAdapter.OleDbSource.5" is registered to point to SSIS 2016 OLEDB Source.
Similarly, the ProgID “DTSAdapter.OLEDBDestination.5” is registered to point to SSIS 2016 OLE DB Destination are under
If you still have the issues, then please contact Microsoft CSS team for further assistance.
Any Sample code is provided for the purpose of illustration only and is not intended to be used in a production environment. ANY SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
Ranjit Mondal – Support Engineer, SQL Server BI Developer team, Microsoft
Krishnakumar Rukmangathan – Support Escalation Engineer, SQL Server BI Developer team, Microsoft