title: OPC Server add items error HResult
body: <p>I am writing a code which reads the data from the OPC server.</p>
  
  <pre><code>public void setOPC()
  {
              int count = 1;
  
              try
              {
                  opcServer = new OPCServer();
                  opcServer.Connect("OPCTechs.SiemensNet30DA", "");
                  opcServer.OPCGroups.DefaultGroupIsActive = true;
                  opcServer.OPCGroups.DefaultGroupDeadband = 0f;
                  opcServer.OPCGroups.DefaultGroupUpdateRate = 10;
  
                  opcGroup = opcServer.OPCGroups.Add("MP");
                  opcGroup.IsSubscribed = false;
                  opcGroup.OPCItems.DefaultIsActive = false;
  
                  int[] h = new int[844];
  
                  for (int i = 69; i &gt;= 60; i--, count++)
                  {
                      h[count] = opcGroup.OPCItems.AddItem("HH1001.B" + i, count).ServerHandle;
                  }
  
                  for (int i = 69; i &gt;= 60; i--, count++)
                  {
                      h[count] = opcGroup.OPCItems.AddItem("GF1001OP190.B" + i, count).ServerHandle;
                  }
  }
  </code></pre>
  
  <p>In the above code, as it executes the second loop &amp; reaches the line</p>
  
  <pre><code>h[count] = opcGroup.OPCItems.AddItem("GF1001OP190.B" + i, count).ServerHandle;
  </code></pre>
  
  <p>it gives the error</p>
  
  <pre><code>Exception from HRESULT: 0x0040007
  </code></pre>
  
  <p>If it executes the first loops <code>AddItem</code> successfully, why it is giving problem with the second one?</p>