I added a connection (ADO.NET) object by name testCon in the connection manager - I wanted to programmatically supply the connection string. So I used the "Expressions" property of the connection object and set the connectionstring to one DTS variable. The idea is to supply the connection string value to the variable - so that the connection object uses my connection string.
Then I added a "Backup Database Task" to my package with the name BkpTask. Now whenever I try to set the connection property of BkpTask to the testCon connection object, by typing testCon, it automatically gets cleared. I am not able to set the connection value.
Then after spending several hours I found that this is because I have customized the connection string in testCon. If I don't customize the connection string, I am able to enter the "testCon" value in the connection property of the BkpTask.
Is this an intrinsic issue?
Not quite sure what this issue is, but I tried this-
Created a ADO.Net connection and set an expression on the ConnectionString property. Evaluated value is a valid conn string.
Add a Backup DB Task, and set an expression on the Connection property. Evaluated value is name of connection created above.
Works fine, executes fine. If the Tasks' Connection property, the literal value is wrong at design-time, but will be correct at run-time when the expression is evaluated overriding the literal value, you may want to set the DelayValidation property to True for the task.
|||Thanks, this one - setting the DelayValidation was useful. What I tried was to customize the connectionstring in expression property of ConnectionManager. My issue is now solved, Thanks a lot.
No comments:
Post a Comment