question

bhuvana_sql avatar image
bhuvana_sql asked

dynamic odbc connectivity failure

Hi, Our requirement is to create a dynamic package from Script task based on the type of connection and table from input variable. Im trying to connect to Netezza with odbc connection using DSN with the below code but its not working. Its throwing exception at source.instantiate(). Our dev server is 64bit and Netezza server is 32bit, so I have set the Run64BitRuntime to False. Please give a solution. ConnectionManager SourceCon = package.Connections.Add("ODBC"); SourceConString = "uid=DBname;pwd=password;Dsn=DSNname"; SourceCon.ConnectionString = SourceConString; SourceCon.Name = "Source"; ConnectionManager SconMgr = package.Connections["Source"]; source.ComponentClassID = " ADO.NET:System.Data.Odbc.OdbcConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; CManagedComponentWrapper srcDesignTime = source.Instantiate();
dynamic-sqlodbcnetezza
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.