Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 未找到c SSIS错误二进制代码_C#_Visual Studio 2012_Soap_Ssis_Sharepoint 2007 - Fatal编程技术网

C# 未找到c SSIS错误二进制代码

C# 未找到c SSIS错误二进制代码,c#,visual-studio-2012,soap,ssis,sharepoint-2007,C#,Visual Studio 2012,Soap,Ssis,Sharepoint 2007,我正在SSIS包中使用SOAP从sharepoint列表中获取行。列表为2007,因此我无法使用常规共享点连接器 脚本说它构建成功,但我有一个错误,脚本的二进制代码找不到。请打开脚本。。。。我已经通过这个和谷歌,我想我已经变成了代码盲,我只是看不出我做错了什么 代码如下: >#region Namespaces >using System; >using System.Data; >using System.Net; >using System.Security;

我正在SSIS包中使用SOAP从sharepoint列表中获取行。列表为2007,因此我无法使用常规共享点连接器

脚本说它构建成功,但我有一个错误,脚本的二进制代码找不到。请打开脚本。。。。我已经通过这个和谷歌,我想我已经变成了代码盲,我只是看不出我做错了什么

代码如下:

>#region Namespaces
>using System;
>using System.Data;
>using System.Net;
>using System.Security;
>using System.Xml;
>using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
>using Microsoft.SqlServer.Dts.Runtime.Wrapper;
>using SC_45b2900a2cc74c6b8d017e26b0213177.spSource;
>#endregion

 public override void CreateNewOutputRows()
{
    string userId = Variables.UserId;
    string passWord = Variables.PassWord;
    DateTime asOfDate = Variables.LastDate;

    SecureString encryptPassword = new SecureString();
    foreach (char c in passWord.ToCharArray())
    {
        encryptPassword.AppendChar(c);
    }

    const string LISTNAME = @"BPOS Dedicated";

这就是整个剧本吗?我假设它在类定义中?我还假设您已尝试重建,并确保在编辑脚本时退出打开的Visual Studio新实例?是否从单独的代码实例复制并粘贴SSIS代码命名空间?如果GUID不同,它将抛出类似的错误。
   const string DateQuery = @"<Where>
                           <Or>
                               <Geq>
                                   <FieldRef Name='Created'/>
                                   <Value IncludeTimeValue='TRUE' Type='DateTime'>[LASTDATE]</Value>
                               </Geq>
                               <Geq>
                                   <FieldRef Name='Modified'/>
                                   <Value IncludeTimeValue='TRUE' Type='DateTime'>[LASTDATE]</Value>
                               </Geq>
                           </Or>
                       </Where>";
    System.Net.NetworkCredential netPass = new System.Net.NetworkCredential(userId, encryptPassword);

    SC_45b2900a2cc74c6b8d017e26b0213177.com.microsoft.msonline.Lists webRefSvc = new SC_45b2900a2cc74c6b8d017e26b0213177.com.microsoft.msonline.Lists();
    webRefSvc.Credentials = netPass;

    XmlDocument xmlDoc = new System.Xml.XmlDocument();

    XmlNode ndQuery = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "");
    XmlNode ndViewFields = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields", "");
    XmlNode ndQueryOptions = xmlDoc.CreateNode(XmlNodeType.Element, "QueryOptions", "");

    ndQueryOptions.InnerXml = "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns><DateInUtc>TRUE</DateInUtc>";
   ndViewFields.InnerXml = @"<FieldRef Name='ID' /> 
                            <FieldRef Name='Request Type' />";
    ndQuery.InnerXml = DateQuery.Replace("[LASTDATE]", asOfDate.ToString("s"));

    XmlNode ndListitems = webRefSvc.GetListItems(LISTNAME, null, ndQuery, ndViewFields, null, ndQueryOptions, null);

    foreach (XmlNode item in ndListitems)
    {
        RowBuffer.AddRow();

        int intConv = 0;

        if (item["ID"].Value != null)
        {
            string idString = item["ID"].Value.ToString();

            if (int.TryParse(idString, out intConv))
            {
                RowBuffer.ID = intConv;
            }
        }

        RowBuffer.RequestType = item["Request Type"].Value.ToString();

    }

    RowBuffer.SetEndOfRowset();
}