• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

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.



0
studioEtc
Asked:
studioEtc
  • 4
  • 4
1 Solution
 
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
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
 
studioEtcAuthor Commented:
Sorry I'm so late awarding points...  Jim
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now