Unable to run an SSIS package from vb6

0

I'm trying to execute a paquete SSIS from vb6 . From c# I can run the package if I use the following App.config:

<?xml version="1.0"?>
  <configuration>
   <startup>
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
   </startup>
</configuration>

The error that occurs from vb6 or c# if I do not change the App.config is as follows:

  

The Execute method on the task returned error code 0x80131621 (Mixed mode assembly is built against version 'v2.0.50727' of the runtime and can not be loaded in the 4.0 runtime without additional configuration information.). The Execute method must succeed, and indicate the result using an "out" parameter.

But how do I run it from vb6 ?

This is my code in vb6 :

pkgLocation = "c:\Package.dtsx"
  Set dtsApp = New Application


  Set package = dtsApp.LoadPackage(pkgLocation, True, Nothing)
  Set pkgContainer = package

  pkgResults = package.Execute

  If (pkgResults = 0) Then
   MsgBox "Success"
  Else
    MsgBox "Fail"
  End If

Thanks for your help

    
asked by Gringo 25.08.2016 в 02:49
source

1 answer

0

I found a solution in the following post: link

In summary, if my vb6 application is called vb6.exe, I have to have an app.config file with the name vb6.exe.config in the same directory where the vb6.exe is located

I hope you help someone.

    
answered by 01.09.2016 / 23:31
source