Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Error: Calling SSIS Package from VS2010(C#)

Author  Topic 

StalinSubash
Starting Member

2 Posts

Posted - 2011-06-09 : 03:08:37
Hi,

I created a sample SSIS package, import data from csv file and store it into sql server 2008 db.if i execute the package alone it will execute.

If call via Visual Studio 2010, i got below error.

C# code:
--------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;

namespace SSISConsoleApps
{
class Program
{
static void Main(string[] args)
{
Application app = new Application();
Package package = app.LoadPackage(@"D:\Projects\SampleSSIS\SampleSSIS\Package2.dtsx",null);
DTSExecResult result = package.Execute();

}
}

Error:
------
Cannot implicitly convert type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSPackage100' to 'Microsoft.SqlServer.Dts.Runtime.Wrapper.Package'.
An explicit conversion exists (are you missing a cast?)

Please advise me on this.

Thanks
Stalin.M

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2011-06-09 : 06:58:25
This is a dup of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=161607

When you post, post only to one forum, posting it to multiple forums fragments the replies, and in general annoys otherwise very nice people
Go to Top of Page
   

- Advertisement -