SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Getting Error for Dynamic file name


Getting Error for Dynamic file name

Author
Message
murali.ms18
murali.ms18
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 77
Hey I am also working on same task like this In SSIS ftp task...

Here I created a variable for getting dynamic file name path for
"LOCAL PATH"..
@[User::LDirectoy] = "E:\LocalFilefolder\"
@[User::LZipFilePrefix] = "KK_"
@[User::LZipFileEndExtension] = ".rar"

@[User::LDirectoy]+ @[User::LZipFilePrefix] + (DT_STR, 4, 1252) DAY( DATEADD("dd", -1, GETDATE() ) )+"-"+RIGHT("0"+(DT_STR, 4, 1252) MONTH( GETDATE() ),2)+"-"+(DT_STR, 4, 1252) YEAR( GETDATE() )+ @[User::LZipFileEndExtension]
op: for this expression.." E:LocalFilefolder/KK_26-09-2012.rar"

while debugging i am getting
Error: Failed to lock variable "E:\LocalFilefolder\KK_26-09-2012.rar" for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".



Any help will be apreciated.......
n79799
n79799
SSC-Enthusiastic
SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)

Group: General Forum Members
Points: 152 Visits: 122
I am assuming you are getting the error in a script task. That happens when you are trying to access a vraibale inside the script without first specifyinf it on the container in the
'ReadOnly Variables' and the 'WriteOnly Variables' section.
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)

Group: General Forum Members
Points: 53954 Visits: 21208
n79799 (10/9/2012)
I am assuming you are getting the error in a script task. That happens when you are trying to access a vraibale inside the script without first specifyinf it on the container in the
'ReadOnly Variables' and the 'WriteOnly Variables' section.


I think you meant Read/Write variables. Write-only variables have limited use.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search