tags:

views:

251

answers:

1

When I run SSIS package from BIDS it runs fine without any error / problem. When I try to call it through a ASP.NET website I get the following error - "String or binary data would be truncated. The statement has been terminated." I checked all the columns / data to see if anything is exceeding the limit, everything is fine. I can run the package through command line using dtexec C:>dtexec /f "C:\temp\MyTempPackage.dtsx", it executes without any problem . The problem is when I try to run it through ASP.NET. The following is the code that I am trying to use -

                            //DTS Runtime Application
                        Application app = new Application();

                        //DTS Package
                        Package package = app.LoadPackage(packagePath, null);




                        //Execute and Get the result
                        DTSExecResult result = package.Execute();

I am making a call to a webservice from asp.net which has the above code. Both the webservice and website have identity impersonation enabled. I have identity enabled in my web.config for this

<identity impersonate="true" userName="MyUserName" password="MyPassword"/>

This problem is only when I am trying to import a Excel file (.xlsx) when I import a .txt file everything is fine. Excel Import blew up in both 32bit and 64bit enviornments.

Help on how to make this to work is greatly appreciated.

+1  A: 

You must add this string in you SSiS:

SET ANSI_WARNINGS OFF;

Kostya