Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Unable to cast COM object of type System.__ComObject to class type System.Data.SqlClient.SqlConnection Expand / Collapse
Author
Message
Posted Tuesday, September 23, 2008 3:45 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, March 18, 2010 3:56 PM
Points: 73, Visits: 51
I have a script task in the control flow where in I am connecting to the database (SQL Server 2005) and executing a SQL Statement. This was working, now when I try to change the package the script task fails with the following error:

Something Bad Happen Unable to cast COM object of type System.__ComObject to class type System.Data.SqlClient.SqlConnection. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.


The connection manager that I have created and I am using is a ADO .NET connection manager so that should not be the issue. Any inputs on resolving this will be much appreciated.

Thanks,

Monisha
Post #574811
Posted Tuesday, December 29, 2009 8:36 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, December 30, 2013 9:17 AM
Points: 11, Visits: 110
Would be worth to check what service pack you have for SQL 2005, There were a few issues with SSIS 2005 and MS came out with a bunch of hot fixes for them in their service packs,
Could be found at -
http://support.microsoft.com/?id=955706

In addition,on the Script Task check for the PreCompile to be False if you are on Service Pack 1 or something.

Post #839868
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse