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

Use Package Config DB Connection string in Script Task

$
0
0

I tried way 1 below but connection returned was null.

So I got the ConnectionString as Way 2 below and tried to create new connection

Way 1:

connection = new SqlConnection(); connection = (SqlConnection)(Dts.Connections["Restrc_dbconn"].AcquireConnection(Dts.Transaction) as SqlConnection);

Way 2:

string connString = Dts.Connections["Restrc_dbconn"].ConnectionString;

connection = new SqlConnection(connString);

This gives me error saying "Keyword not supported :Provider"

The steps I tried above does not use Package Config. Can someone please help me how to use it. And i f I use Package Config, the connection string in that also would have Provider so how can we overcome the Provider keyword error.

Thanks In Advance!!




Viewing all articles
Browse latest Browse all 24688

Trending Articles



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