Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

store sql connection string as a parameter in SSIS

$
0
0

Hi,

I am having a connection string specified within my script and now I want to store it as a dts variable so that i can change its value when i deploy to different servers.I tried to store the connection as a parameter of string type this way:

Data Source=xyz;Initial Catalog=Oracle;Provider=SQLNCLI10;Integrated Security=TRUE

And,my script reads the variable from  ReadOnly variable and following is in the script:

 var connectionString = Dts.Variables["$Package::Connection"].ToString();

I get the error here:

using (SqlConnection connection =
                                   new SqlConnection(connectionString))

This is the error: "Format of the initialization string does not conform to specification starting at index 0"

I dont know what is the exact format,pls help


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>