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.



studioEtcAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PedroCGDCommented:
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
0
studioEtcAuthor Commented:
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
0
PedroCGDCommented:
you want to insert the filename in database on the controlflow or in dataflow?
regards
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

studioEtcAuthor Commented:
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
0
PedroCGDCommented:
the filename is a textfile?
0
studioEtcAuthor Commented:
yes
0
PedroCGDCommented:
Check the attached package and tell me if it helps you.
Update the variable uvFilenameALL
Regards!
Pedro
www.pedrocgd.blogspot.com
Package-EE51-dtsx.txt
Filename.JPG
BudgetEx.txt
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
studioEtcAuthor Commented:
Sorry I'm so late awarding points...  Jim
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.