JustinEzequiel
Programmer
cross-posted at
How come the C# version succeeds when the VB version fails?
How come the C# version succeeds when the VB version fails?
Code:
//C#
using System;
using Microsoft.SqlServer.Dts.Runtime;
namespace cs_console_SSIS
{
class Program
{
static void Main(string[] args)
{
Application app = new Application();
Package package2;
DTSExecResult result2;
package2 = app.LoadFromSqlServer(
"\\OHBilling", "C2130001312", "billing", "billing",
null);
package2.ImportConfigurationFile("D:\\Program Files\
\Microsoft SQL Server\\90\\DTS\\Packages\\SSISOHBilling\
\OHBilling.dtsConfig");
result2 = package2.Execute();
Console.WriteLine("Package Execution results: {0}",
result2.ToString());
}
}
}
Code:
' VB
Imports System
Imports Microsoft.SqlServer.Dts.Runtime
Module Module1
Sub Main()
Dim app As New Application()
Dim package2 As Package
Dim result2 As DTSExecResult
package2 = app.LoadFromSqlServer( _
"\OHBilling", "C2130001312", "billing", "billing",
Nothing)
package2.ImportConfigurationFile("D:\Program Files\Microsoft
SQL Server\90\DTS\Packages\SSISOHBilling\OHBilling.dtsConfig")
result2 = package2.Execute()
Console.WriteLine("Package Execution results: {0}", _
result2.ToString())
End Sub
End Module