<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Data from DotCMIS Query only working once. in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/data-from-dotcmis-query-only-working-once/m-p/297705#M250835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You don't need to execute the query a second time,you have several options :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.You can use TotalNumItems properties of IItemEnumerable to get the number of result set first and then construct string array.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Use a collection to save string object and then convert it to an string arry,like following&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;ArrayList myAL = new ArrayList();&lt;BR /&gt;foreach (IQueryResult hit in qr)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;myAL.Add(hit["cmis:objectId"].FirstValue.ToString());&lt;BR /&gt;}&lt;BR /&gt;String[] myArr = (String[]) myAL.ToArray( typeof( string ) );&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2014 08:31:58 GMT</pubDate>
    <dc:creator>kaynezhang</dc:creator>
    <dc:date>2014-08-28T08:31:58Z</dc:date>
    <item>
      <title>Data from DotCMIS Query only working once.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-from-dotcmis-query-only-working-once/m-p/297704#M250834</link>
      <description>I am working on an application in C# that pulls the names and paths of all documents containing a certain string, and fills arrays with that data for later use.&amp;nbsp; And I have noticed that, for some reason, I can only use the query data once.For context, C# does not allow me to initialize the arrays wi</description>
      <pubDate>Wed, 27 Aug 2014 18:35:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-from-dotcmis-query-only-working-once/m-p/297704#M250834</guid>
      <dc:creator>goebelchase</dc:creator>
      <dc:date>2014-08-27T18:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Data from DotCMIS Query only working once.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-from-dotcmis-query-only-working-once/m-p/297705#M250835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You don't need to execute the query a second time,you have several options :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.You can use TotalNumItems properties of IItemEnumerable to get the number of result set first and then construct string array.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Use a collection to save string object and then convert it to an string arry,like following&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;ArrayList myAL = new ArrayList();&lt;BR /&gt;foreach (IQueryResult hit in qr)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;myAL.Add(hit["cmis:objectId"].FirstValue.ToString());&lt;BR /&gt;}&lt;BR /&gt;String[] myArr = (String[]) myAL.ToArray( typeof( string ) );&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 08:31:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-from-dotcmis-query-only-working-once/m-p/297705#M250835</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-08-28T08:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Data from DotCMIS Query only working once.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/data-from-dotcmis-query-only-working-once/m-p/297706#M250836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you, that's very helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I wasn't aware ArrayLists could be used like that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 13:31:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/data-from-dotcmis-query-only-working-once/m-p/297706#M250836</guid>
      <dc:creator>goebelchase</dc:creator>
      <dc:date>2014-08-28T13:31:28Z</dc:date>
    </item>
  </channel>
</rss>

