c# - Adding SSIS Connections Programmatically - Oracle Provider for OLE DB -


I am writing C # applications to generate an SSIS package.

Part of this using the Database Connection Manager - Library Microsoft.SqlServer.Dts.Runtime . The following line of code shows how this can be done:

  Connection Manager cm = pkg.Connections.Add ("OLEDB");  

In the above code, I am adding an OLDB connection, which creates a connection with the provider "Original OLEDB / SQL Basic Client" .

I do not want this, instead I want the provider Oracle Provider for OLEDB .

Different types of connection manager types are shown from the following sites:

But no one notifies that the use of Oracle ALLDB provider Is able to, and the Oracle type specified on the second link is valid for SQL 2008.

Will I have to go down the path of the development of my own custom manager described here?:

Any help would be appreciated

James

You have to set the connection string to say OLEDB connection to use the following Oracle Provider:

  package pkg = new package (); Connection Manager Manager = pkg.Connections.Add ("OLEDB"); Manager.ConnectionString = "Data Source = DEVORA.my.OracleDB; User ID = oracleUser; Provider = MSDAORA.1; Continue to Security Information = True;"; Manager.Name = "OracleDev";  

Obviously you have to create a valid connection string for your environment (Hint: create one in the first SSIS designer and select its connection string)

What were you looking for? Tell me if I am out of the mark and I will try to amend it properly


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -