.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

C# newbie stuck - trying to access column data in a SharePoint list in an SSIS script task

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :SharePoint
Hello, I'm sure this is the simplest question but I can't figure it out, even with Google's help. I am trying to stumble through some C# code in an SSIS script task and I am frustrated that I can't figure out how to do the easiest things.  I eventually want to find data in a column,and then use another list as a lookup to replace that value with another where the existing value matches a value in the lookup list.  So, the data in my (multiple choice) column might be "apples; bananas" and in another list I have a row that contains two columns, the first holding the value "Apples" and the second containing "Red Delicious" and my original column should read: "Red Delicious; bananas." But, alas, I can't even figure out how to see the data that is in a column. Here is my code: /*<br/> Microsoft SQL Server Integration Services Script Task<br/> Write scripts using Microsoft Visual C# 2008.<br/> The ScriptMain is the entry point class of the script.<br/> */<br/> <br/> using System;<br/> using System.Data;<br/> using Microsoft.SharePoint;<br/> using Microsoft.SqlServer.Dts.Runtime;<br/> using System.Windows.Forms;<br/> using Microsoft.SharePoint.Utilities;<br/> <br/> namespace ST_08becda4c05c49cd9f30ea76110076cd.csproj<br/> {<br/> [

View Complete Post

More Related Resource Links

Sharepoint list group by column data ,display in webcontrol like panel or label


I  have a sharepoint list[Managers] with groupby sector column. like below




Each Sector group by column data i want to display in label or panel control.

How to do that ? how to write the logic?



Regards, Mansoor

Best way to display data of a single column from a Sharepoint Custom List

I'm trying to create pages that will automatically populate with data pulled from a sharepoint list (like title, department, contact info, etc.).   I'm using publishing pages. What would be the easiest way to do this, and how would I specify which data to pull from the list? For example, the page would be set up like this: [Title:biology] [Department:biology] [Contact Info:biology]   and when the page loads, it would look like this: Biology Lab Biology Department 123-456-7890   I want it to just pull the data -- I don't want a list view or anything like that.  I need this page to look pretty, and I need the each column's data to show up in a very specific place. How could I make pages that would do that?

I need to create a script in SSIS which creates a data source that connects to an Access database.

I need to create a script in SSIS which creates a data source that connects to an Access database. The Access database file name needs to be set as a variable as it will change from month to month. I have no idea what I am doing can anybody give me some tips? Mr Shaw

Writing XML data from URL to Object in SSIS Script Task

I have this URL where there is XML data. I have to extract that data from URL and dump it into DW table. I am using SSIS Script Task for that.

This is how the data looks like:
<cname>United Arab Emirates Dirhams</cname>
<cname>Afghanistan Afghanis</cname>
<cname>Albania Leke</cname>

This is the code i'm using to load it into some Object type or something. But i dont know how to do that.

public void Main()
   String URLString = "http://www.xe.com/dfs/datafeed2.cgi?beeline";
   XmlDocument doc = new XmlDocument();
   XmlTextReader reader = new XmlTextReader(URLString);

   XmlNodeList currencynodes = doc.SelectNodes("currency");
   foreach(XmlNode currency in currencynodes)
    XmlNode csymbol = currency.SelectSingleNode("csymbol&quo

sharepoint 2010 task list added new column


Hi everyone,

I've created a task list on sharepoint 2010 by default it has set of columns i.e title, priority, status, %complete etc...... then I added a new column called 'task group' but when I put information on a newly added column and click on save, the information that I entered on the new column does not save.

Any idea???


Thanks in advance.

SSIS Derived Column and Data Conversion Task


I am passing down a variable, filename, as  string and then using Derived Column to pass it down to the destination. The filename is numeric (date) like such: 20101010. So, I need to convert the filename into a date formmat before I pass it to the destination table. Therefor, I am using a data conversion and converting it to a Date format. I tried using both database date or the date format and it keeps failing.

Here is what the failure report:

[Data Conversion [42297]] Error: Data conversion failed while converting column "DateAdded" (29685) to column "Copy of DateAdded" (42310).  The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".  

Any ideas to resolve this issue?



SSIS 2005 - Multiple data flows from a Script task


I have a variable that the user sets to an excel file. Because the file can be of a different version of Excel, I'm testing the version first in a script task. Depending upon the version I then want to call a specific DataFlowTask and also want to set the connection Manager accordingly for that DataFlow task.

i.e. if XLS extension then use the DataFlowTask with the Excel OLEDB Provider setting the connection to the variable passed.

if XLSX extension then use the DataFlowTask that uses the Office OLDEDB Provider with the Extension of Excel 12.0 again using the Variable passed as the connection setting.

An example on how to achieve this would be good.


Using SharePoint web services to access KPI List data



How to get the indicators in a KPI list data(like list row data) from SharePoint using SharePoint web services





Selecting a Task List in Sharepoint Designer 2007 while setting up "Collect Data from User"

When using Sharepoint Designer 2007 to Collect Data from User the task list cannot be selected.  Instead the Task list that is defaulted is the most recently created Task List.  How can I select a specific Task list to associate with"Collect Data from User"?

SSIS: return list of custom objects after a Script Task


I'm having problems returning a list of self-created .NET objects to a SSIS object variable.

In my SSIS Script Task I'm calling:

Dim fileList As List(Of FileNameEntityDate) = read.getFileNameEntityDate

Directly after this call, It is populated as the size of the List != 0:


Now, I'm trying to return that list to SSIS using variables:

Dts.Variables("oFilenameEntityDate").Value = fileList

oFilenameEntityDate is defined in SSIS as being an Object.
It is also placed in my 'Script Task' under 'ReadWriteVariables'.

When I watch that variable, it seems empty:

- User::oFilenameEntityDate
	Type	__ComObject	
	Value	System.__ComObject	

What should I do to get this working? Thanks!!

Reading excel data in SSIS Script task


I am reading an excel file using OleDbDataReader.

I can read all cells from the sheet. But when I read a string value its returning me a NULL value. If I replace that cell with a Integer value I can get it.

Basically I am doing a validation on the cells to see if there are any non-numeric values. For certain cells which has string value I can get it as string and I can do the validation but for certain others I cant. Its returning as NULL. Any help would be really helpful.




SharePoint Portal Server 2001: Search and Access Disparate Data Repositories in Your Enterprise


The knowledge worker is greatly empowered if she is able to access information across the enterprise from a central access point. With the SharePoint Portal Server 2001 Search Service you can catalogue information stored in Exchange public folders, on the Web, in the file system, and even in Lotus Notes databases. This article discusses the use of ActiveX Data Objects and the Web-based Distributed Authoring and Versioning protocol for creating search solutions based on SharePoint Portal Server 2001.

Kayode Dada

MSDN Magazine April 2002

using SharePoint List for SSIS package

I need to use a sharepoint list as data source for SSIS package, it works fine until the sharepoint site implement Kerberos only (IIS 7) authentication, anyone knows how to get around this? thanks.

Use BDC data in list as multi-select column

I have a document library that uses values from another system for its metadata.  Right now, we copy the values from the primary system into SharePoint so users can choose them.  I want to find a way to use the BDC connection that I have set up to automatically pull those values.  The problem is that the current metadata is set to multi-select.  So, I have a file that is in the library and it can be used for multiple clients - clients is a column in my library and users can select many entries.  When I set up a column to pull BDC data, it only allows single entry.  Does anyone have any ideas?

Can I create several steps to be run on a SharePoint list as a task to run on a daily basis?


We have a manual process that we do on a SharePoint list to export data from SharePoint to a spreadsheet that can then be used by non SharePoint programs.  I'd like to be able to automate this process so that it can be scheduled as a Task to run on a daily basis.   Not sure if a workflow can do what I'd like it to.  I have SharePoint Designer 2007 as well.

Here are the steps:

1. Load a particular View of a SharePoint List

2. From the view's Action menu, "Open with Access"

3. Save the resulting Access database as a file to a specific Folder on the computer hosting SharePoint

This would be run as a Task on the computer hosting SharePoint.

Quick Note: Create Silverlight Applications to Access SharePoint 2010 Data

In this exercise, you will learn how to create Silverlight applications to display SharePoint 2010 lists inside DataGrid controls.

Developer Training: Data Access in Technologies in SharePoint 2010

Learn about the new data access technologies in SharePoint 2010 and how they can help increase your productivity. This training module covers the basics of LINQ handling and how to use the Client OM and REST to access SharePoint 2010 information remotely.
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