My initial thought is that there is a security setting missing from the application. Since we cannot be certain of this without examining it, we recommend that you continue this with OSIsoft Tech Support. They would like version numbers, logs, and probably a remote session. You can call them at 510-297-5828, or email them at email@example.com. Please reference this thread from PI Square when you contact them.
1 of 1 people found this helpful
I found the resolution here. The code is failing at below line,
lRetVal = pilg_login(Me.hWnd, strPIUID, strPISvr, strPIPwd, 1)
which returns pilg_login() returned error code -3 which translates to “Specified server does not exist” message. So, I checked into the piclient.ini and pilogin.ini in both x86\PIPC\DAT and PIPC\DAT.
The PI server defined as "Collective" which PI API doesn't understand as it's older technology. So, I changed it with Primary PI Server name & it works.
For each connection there is an optional trust setting. This can be "NONE", "FIRST", "LAST". This is used by the method pilg_login to determine what to do when connecting to the server.
NONE -> Don't assume a trust exists; if the various login attempts fail, bring up the login dialog. If that fails then report failure. This is also the case if the PIxTrust entry is missing for a particular server.
FIRST -> Don't bother with login attempts. Assume there is a trust and immediately add the server to the logged in server map with PIREAD access.
LAST -> Try all the various login attempts, if they all fail, then don't bring up login dialog; instead, assume there is a trust and add the server to the logged in server map with PIREAD access.
Thanks everyone for kind help.
I'm glad my advice via email helped!
I also want to warn others, that the error message in the beginning of this thread is custom made and non-OSI specific.
I'll go ahead and close the corresponding support call # 623049.