Problem
When you create a package in SSIS with AS400 DB2 connection using ODBC, and when you run the package through SSMS after deploying into SQL server and if you get the error “The version of AS400, clsid{xxxxx} is not compatible with this version of the dataflow”, then follow the couple of steps to fix. But when you run the package from visual studio you will not get this error.
Solution
First you have to change the TargetServerVersion. To do this right click on project then select properties, then expand the Configuration Properties and in General tab change the TargetServerVersion to the SQL Server version which you have.
Next you have to deploy the package into SQL Server with the SSMS of version same as SQL Server version.
Now if you run the package, your package will get executed successfully. Please comment still if you face the error.