Monday, March 26, 2012

Newbie question - how do I specify a variable for the file location when using the Execute Packa

There are two options to specify the subpackage location (SQL Server or file location). I'd like to know how I can specify a variable name that points to the file location so I avoid hard coding the file location which could change during production installation.
thanks

This is a start.
http://sqljunkies.com/WebLog/knight_reign/archive/2005/11/12/17375.aspx
Thanks,
K|||

To do this you must work on the file connection manager not on the task.

You go and add a property expression to Expression colection of the CM that would map your variable to the ConnectionString property of the CM.

Thanks,
Ovidiu

|||

Hi, I'm another newbie.

Can you give a short example of how to do that?

Thanks,

Roger

|||

Hi Ovidu,

Thanks for the reply. Yes, I am working in the connection manager. The problem I'm having is getting the connectionstring property to recognize a string variable. I've played with it a lot and the only syntx that I've tried that doesn't cause an error on entry is @.MyVariable. but, when I run the package, it is interpreted as a file name, which it doesn't find.

Tha variable is in scope. When I substitute a script task with a msgbox, I can step through the files. Can you show me a short example of how you'd do it?

Thanks, again,

Roger

sql

No comments:

Post a Comment