AnsweredAssumed Answered

How do you connect to a virtual machine via the API?  VBA

Question asked by Brad Stein on Mar 18, 2014
Latest reply on Mar 28, 2014 by Brad Stein

I'm trying to login to the EPDM server via the API and I keep getting:  "Run-time error '-2147220952 (80040228)':  An unknown network error occurred.  (40)"  From what I understand this error is indicating a problem with the pointer to the server.  This is my code:

 

Public PDMcom As New PDMWorks.PDMWConnection

Public PDMdoc As PDMWorks.PDMWDocument

 

Private Sub ConnectToPDM()
    'If PDMusername = "" And PDMpassword = "" Then
    '    PDMusername = InputBox("Plese provide your PDM UserName.", "PDM UserName")
    '    PDMpassword = InputBox("Plese provide your PDM Password.", "PDM Password")
    'ElseIf PDMusername = "" And Not PDMpassword = "" Then
    '    PDMusername = InputBox("Plese provide your PDM UserName.", "PDM UserName")
    'ElseIf Not PDMusername = "" And PDMpassword = "" Then
    '    PDMpassword = InputBox("Plese provide your PDM Password.", "PDM Password")
    'End If
   
    PDMcom.login PDMusername, PDMpassword, HostNameToIP("magicdb") 'PDMserverLoc 'Resolve(PDMserverLoc)  'PDMserverLoc

End Sub

 

HostNameToIP converts the network location into an IP address string, this is reliable and works (the returned IP address string has been confirmed).  The username and password are my own and defined as constants.  The ports being used are the defaults.  I believe that I'm using everything as is expected, the only complication I can think of is that the EPDM vault is being run on a virtual machine.  I'm not sure exactly how this effects things, but I believe it is clearly causing problems.  Moving the server to a physical location wouldn't be worth using the API.  The purpose of using the API is to allow for users to automatically checkout ("takeownership" of) certain specific office files (access databases) that have been moved into the vault.  It is the login method that is encountering the error and so that is all the code I have included.  If anyone has any thoughts, ideas, or experience with virtual machine vaults, please speak up and let me know.  If any additional information is required to assist, I will get it for you.  I would be most appreciative of any help.

 

 

-Thanks

Outcomes