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