January 2, 2010 at 10:57 am
Hi,
I am new to SSIS.I defined ReadOnlyVariables "FileName".In script it is showing the following error,which is shown in attachment.Please tell me correct syntax.
Thanks in advance
January 2, 2010 at 11:24 am
Can you provide more details as to what you are trying to accomplish?
January 2, 2010 at 11:31 am
User::FileName
and it's case-sensitive.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
January 2, 2010 at 11:32 am
public void Main()
{
Variables var = null;
if (Dts.Variables.Contains("FileName") == true)
{
// Dts.VariableDispenser.LockOneForRead["FileName", var);
Dts.VariableDispenser.LockOneForRead("FileName",var );
}
MessageBox.Show("Found the file: "+var["FileName"].Value.ToString());
Dts.TaskResult = (int)ScriptResults.Success;
}
January 2, 2010 at 12:00 pm
elchuru (1/2/2010)
public void Main(){
Variables var = null;
if (Dts.Variables.Contains("FileName") == true)
{
// Dts.VariableDispenser.LockOneForRead["FileName", var);
Dts.VariableDispenser.LockOneForRead("FileName",var );
}
MessageBox.Show("Found the file: "+var["FileName"].Value.ToString());
Dts.TaskResult = (int)ScriptResults.Success;
}
This is the correct syntax:
Dts.VariableDispenser.LockOneForRead( "FileName", ref var );
January 2, 2010 at 8:51 pm
Its working fine
Thanks CozyRoc
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply