formerpigeek

Connection to Collective problem. Error: -2147220310

Discussion created by formerpigeek on Sep 15, 2009
Latest reply on Jun 14, 2010 by Harry

I get the error, "The server is already open under a different connection string.  Close the server before attempting to reopen it.  Sever causing the problem: MVPIOne.

 

Call Stack:
General: ConnectServer
PITagSearch:Search"

 

The problem occurs when I attempt to search for a tag using the Tag Search utility.  This does not present a problem when connecting to a stand alone PI server.  The connection to the collective is handled with the following code:


  If (PISrvr.Connected) Then PISrvr.Close
 
  Set col = PISrvr
 
  If (col.IsCollectiveMember()) Then
    Set colList = col.ListMembers
    Set colMember = colList(PISrvr.Name)
   
    Set PISrvr = Nothing
    Set PISrvr = col.MemberOpen(colMember, "UID=" & Me.txtUser.Text & _
              ";PWD=" & Me.txtPasswd.Text)
  Else
    PISrvr.Open "UID=" & Me.txtUser.Text & _
              ";PWD=" & Me.txtPasswd.Text
  End If

The TagSearch object is launched with the following code:


  Set nvsServers = New NamedValues
  nvsServers.Add srv.Name, 1
 
  Set ptList = TagSearch.Show(nvsServers, tsoptDisableServerPickList + tsoptSingleSelect)

Note that I prevent the user from selecting a different server or selecting multiple tags.  This code immediately follows the connection to the server.  This is an Excel addin that I am trying to test on a PI Collective.

 

 

 

Any suggestions?

Outcomes