[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

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