.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SSIS - Setting TablesList Property with expression

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :Sql Server

I am having problems withing with the Transfer SQL Server Objects task in SSIS.  I would like to set the TablesList Property of the task to the value of an expression.  At a high level, I need to transfer a table from one server to another but the table name is dynamic so I can't use a data flow task.  Each iteration of the package execution will work off of one table so I need to set the TablesList property to the one table. 

Since the property is a collection, I am getting errors when I attempt to just assign the TablesList property to the variable value in the expression builder.  I get this error:

Error at Copy Table To Production: The result of the expression "@[User::TablesList]" on property "TablesList" cannot be written to the property. The expression was evaluated, but cannot be set on the property.

I also tried to open up the SSIS package in textpad and look at the formatting of the TablesList property and then set the variable to match what I saw in the XML......this gave me the same error.

Any suggestions on how to set a StringCollections property in SSIS?

Thanks in advance,


View Complete Post

More Related Resource Links

SSIS Expression?

In my SSIS_HST table have 2 columns one is last process date and counter value.Those values are i am storing in package variables. i will take one enddate variable .enddate=last process date+ counter value.if the last process date valeu is 2010-02-07 and counter value is 3 then my end date value =2010-02-10.How add those expression in my end date variable..  

Creating a volume control slider/setting one template property based on another

So, what I want to do, is to make a volume control that looks like a right angle triangle with the 90 degree angle on the bottom right, and then when you click on it, the area to the left of the selected point is shown in a different color.  In other words, I've created a slider with the right background, what I can't do, is work out how to show the selected area by filling in the triangle.  I have worked out how to bind the height of my triangle on the left to the value of the control, but right now, the rate of rise is exactly half of what I need it to be.  I need to know how to change the template for the area to the left of the selection ( which is the repeat button ) so that the background is twice the height that it is right now.  No matter what size I make the slider, the area is always 1/2 the size it needs to be, so I am sure if I could get it to double inside my template, it would work fine. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">       <Style x:Key="SliderButtonStyle" TargetType="{x:Type RepeatButton}">         <Setter Property="SnapsToDevicePixels" Value="true"/>         <

How Do I Not Include: myControl.GetType.GetProperty("Text") When No Property Window Setting?

Hi All, Posted below is code I'm using to generate a list of controls that have either a "Text" or "Caption" property. However, for certain controls in the resulting list, the property setting (Text/Caption) does not appear in the "Property Window" of the IDE when that control is selected. One example of this is the Systems.Windows.Forms.PictureBox control. Is there a way I can determine this and if so - how do I exclude these control(s) from my list?     Private Sub cmdValidateControls_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdValidateControls.Click         txtResults.Clear()         For Each ctrl As Object In Me.Controls             LogControl(ctrl)         Next     End Sub     Private Sub LogControl(ByVal ctrlIn As Object)         If System.Diagnostics.Debugger.IsAttached Then             If (Not ctrlIn.GetType.GetProperty("Text") Is Nothing) Or (Not ctrlIn.GetType.GetProperty("Caption") Is Nothing) Then                 txtRes

Setting an attached property by a Setter element?

I have the fragment below as contents of a <Grid> element. The idea is that if the checkbox is checked the <TreeView> element should only span one instead of two columns. When I check the checkbox the background of the treeview turns red, but the treeview continues to span 2 instead of 1 column. It's a bit like the attached property Grid.ColumnSpan does not get assigned by the <Setter Property="Grid.ColumnSpan" Value="1"/> at all. What should I do in order to achieve what I want?Best regards,Henrik Dahl   <TreeView    x:Name="Blas"    ItemsSource="{Binding Path=BlasRoot.Children}" d:LayoutOverrides="Width" Margin="0,0,0,8" Grid.Column="0" Grid.ColumnSpan="2">    <TreeView.Style>       <Style>          <Style.Triggers> <DataTrigger Binding="{Binding ElementName=chkPosition, Path=IsChecked}" Value="True">    <Setter Property="Grid.ColumnSpan" Value="1"/>    <Setter Property="TreeView.Background" Value="Red"/> </DataTrigger>          </Style.Triggers>       </Style>    </TreeView.Style> </TreeView> <CheckBox HorizontalAlignment="Left" Margin="-50,0,0,0" x:Name="chkPosition" VerticalAlignment="Top" Content="

SSIS Expression

Hi Guys,   Input: ProductCatalog_181416_20100513010253_2010517_22715_2010715_172740 Expression Used: SUBSTRING(@[User::FileName], FINDSTRING(@[User::FileName], "_", 1) + 1, FINDSTRING(@[User::FileName],"_",3) - FINDSTRING(@[User::FileName],"_",1)-1) Output Getting: 181416_20100513010253   Out Put Required : 181416_20100513   Can please help he out how to get above output.   Thanks,

Dynamically Setting the property value FilterValue1 of the Content Query WebPart? Inline? codeblock?

I want to dynamically set the FilterValue1 property of a Content by Query to the querystring ID. I tried to do it with an inline embed FilterValue1="<%= Reponse.Write .. but no luck Without having to code my own webpart, any way to change the value with a small C# code block? How about with javascript? Thank you!    

SSRS BUG? When a FontStyle expression is used in a report, the Browser Text Size setting overrides t

I have created a report that has the same font size for all the sections in the report. Some sections' fields use a FontStyle expression that changes the FontStyle between Normal and Italics conditionally. I run the report through the reportserver interface and the report looks fine. I run the report through the ReportViewer control and the the fields which use the FontStyle formula are overridden by the Browser's Page Text Size. Also, when I look at the inline HTML Style that's generated, the fields with the formula don't have a style, they are blank, while the fields with without a FontStyle expression have an inline HTML Style generated. And this is probably why the browser text size setting can override. This seems like a ReportViewer HTML render bug... Or is there a way around it??

SSIS: How to set the values of the variables, other ways of setting the values of the variables?

Hi Gurus, Is this the only way in setting the values of the variables. Please see steps below: 1. Build the SSIS Project. From the package's property pages, Deployment Utility, set the CreateDeploymentUtility to TRUE (It will create a Deployment Folder and inside the folder 3 files will be created a) SSISDeploymentManifest b) dtsConfig c)dtsx ) 2. Double click the SSISDeploymentManisfest file. A Package installation will be set up. 3. Follow the steps until you reach the Configuration Packages: Edit package configurations window. 4. From the Configuration part, set the values from the Values(column). 5. To Finish. Is this the only way of setting the values of the variable?

Setting a Property that causes update on a UpadatePanel on Init stage.

Hi, I have a custom control with a UpdatePanel inside. Depending of user action or page programing I call Update method of my UpdatePanel to refresh html portion to user.For example, I created a property called Title. If the Title change i call Update of my UpdatePanel.public string Title { get { return labelTitle.Text; } set { if (labelTitle.Text != value) { labelTitle.Text = value; panelUpdate.Update(); // Refresh the entire control } } }   But if the Title property is configured on aspx file, my UpdatePanel is always refreshed because my Title property is setted on Init stage of page life cycle.I need to know if this property is setted on init stage or if ViewState is restored to avoid call Update, or any tips to avoid refresh my control everytime. Thanks,Tales Aguiar.

Run64BitRuntime property in ssis 2008 programatically

Hello All We are creating the SSIS packages programmatic way and executing the package programatically and we have a problem with the excel file type loading as it is not having the 64-bit jet provider. How can we do this programatically??? Thanks Srikanth.BLN

SSIS Expression Request


Hi Guys,

Input DataType String: C:\Test\CONV-Files\192572\01012010.ajk

Output Required: 192572


I am using below expression for start position, but for some reason FINDSTRING function is searching for "\", it throwing me error message. If I change it to ":" it will 2 position.

e.g: FINDSTRING(@[User::strFQDN], "\", 3)

All, I want is output like this 










property setting in report server (2008) config file is not working as expected.



I have set the <WorkingSetMinimum> property to 2.4GB in my reportserver 2008 config file.

By defintion, <WorkingSetMinimum> setting means,

  1. Lower limit of service memory consumption; memory will not be released if the consumption is below this amount, though the service will not reserve the designated amount of memory when it starts.
  2. If service uses more than the designated amout of memory, it will release back the memory only till this declared value and not beyond that, which means it should keep 2.4GB as designated.

See this link for definition: http://books.google.com/books?id=mzY_Xo_9J-gC&pg=PA589&lpg=PA589&dq=What+is+%3Cworkingsetminimum%3E+in+report+server+configuration+file&source=bl&ots=r_xhRp8erj&sig=E_o0-Dh2SXOgMNrW3sptt5oZrYI&hl=en&ei=f5mjTNeNM5O8ccmErJMI&sa=X&oi=book_result&ct=result&resnum=4&ved=0CCAQ6AEwAw#

SSIS 2008-Variable Expression Type Cast Syntax Error


Hi all members.

I need to ask for the following code. I need to convert the variable into a string.

"Select Distinct convert (int ,A.CustomerCategory) as AccountReceivableCategoryID, convert (varchar(40), B.Text) as AccountReceivableCategoryNameE
from Inkunde A , inpara B
where A.CustomerCategory= B.SearchItem
and B.Language1 = 'EN'
and B.ParameterName = 'CATEGORY'
and A.CustomerCategory = (DT_STR,200,1252) "+  @[User::CategoryID] +"
Order By A.CustomerCategory"

Kindly any member let me know, How to correctly use the Type Cast fucntion in variables

Thanks and Best Regards,


Setting property in mother-form ???


I have a form, A, with a property _B and set/get defined as public.

From form A I start another form - a toolbox - where I can choose a value for the property _B in form A.

But how can I set the value I before I close my other form ?

(The set/get does NOT appear !)

Best regards KSor, Denmark

SSIS Expression to send email with dataset on the Mail Subject line.



I have a task - I need to email total number of products sold on the subject line of the mail task.

I have Execute SQL task process like select count(*) from tablename. Then I need to Mail the result set like "Total products sold September 2010 : 15000" on teh subject line.

I created a variable bit i dont know how to assign it on the subject line of the Send Mail Task.

I would really appreciate if you can guide me.

Thanks for your help.


SSIS Lookup - Mismatched sqlcommand & sqlcommandparam Property Values


I had an issue recently and I'd like to solicit feedback as to whether this is an SSIS flaw:

In the lookup component, when you select the Partial or No Cache option, a property in addition to the sqlcommand property becomes available called sqlcommandparam. Originally this package was developed using Lookups pointing to a dimension on "schema_A" and we wanted to change the reference to "schema_B". Now, obviously the sqlcommandparam property became available because you can elect to use the Advanced SQL option in the component. However, I never chose to do that. So, long story short, I go into this package to change the schema reference in the Lookup's query. It changes the sqlcommand property value to be "select value from schema_B.table" but it didn't change the corresponding value in the sqlcommandparam property. That property remained "select value from schema_A.table". SSIS never threw an error to say the schema's didn't match. And the Lookup worked as designed, picking up values from the table on schema_B. Not until we finally decommisioned schema_A did I get an error at runtime that said "Table or view does not exist".

So, can anyone (hopefully Microsoft) confirm that this is in fact a flaw? I am on MSFT VS 2008 V 9.0.30729.1 SP.


Setting label property in web control


Hello all,

I am converting a 1.1 .NET web app to 3.5, and I've run into a bit of a jam.

One web control has a Property that sets the page title label on that web control.

    Public Overridable Property PageTitle() As String

'Exposes the PageTitle property of the child control.
Return lblPageTitle.Text
End Get

Set(ByVal Value As String)
'TODO: find out why this throws a NullReference exception
lblPageTitle.Text = Value
End Set

End Property

When a page with the web control was loaded before, it would set the Property to a given string, like in ucHeader.PageTitle = "This is a string."  Now, if I don't remove the lblPageTitle.Text = Value, I get a NullReference Exception.  Anyone have any ideas?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend