Link to home
Start Free TrialLog in
Avatar of Jim Singelis
Jim Singelis

asked on

How can I assign an SSIS object property to an SSIS variable

I'm trying to write an SSIS package using Visual Studio. I'm not really coding, I'm just dragging objects and modifying their properties.

I need to assign just the import filename(not the full path) to user::sourceFIle. The sourceFile connection property 'connectionString' contains the full path. I can't figure out how to refer to the property.  I've tried mySourceFileConnection.connectionString and mySourceFileConnection::connectionString.



Avatar of PedroCGD
PedroCGD
Flag of Portugal image

Why you need only the filename?
You can get it using a script task... i can send you and example!
let me know!
regards!
Pedro
www.pedrocgd.blogspot.com
Avatar of Jim Singelis
Jim Singelis

ASKER

The filename needs to go into column in the table.  In plain vanilla Visual Basic I can write the code to parse the filename from the path.  What I don't understand is how script tasks work work with drag and drop objects.  An example would be good!

Jim
you want to insert the filename in database on the controlflow or in dataflow?
regards
In the control flow. The whole package should be:

sqlTask-truncate table->dataFlow->(task-filenameToVar)->sqlTask-runStoredProc

I have everything but the task in Bold
the filename is a textfile?
yes
ASKER CERTIFIED SOLUTION
Avatar of PedroCGD
PedroCGD
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry I'm so late awarding points...  Jim