This function sets the server context. After setting the server context, all the requests against the PI database, go to this server. If a change of server is required, another call to pilg_setservernode should be issued.

C format

PIINT32 pilg_setservernode(

LPCSTR lpszServerName)



System error



The server has been disconnected globally bu issuing pilg_disconnectnode or was never connected


The server specified does not exist


Application is not registered


No servers configured (pilogin.ini not found)



server name.

Usage Notes

Unlike its counterpart piut_setservernode, pilg_setservernode will not perform a connection. It is used merely to switch between existing connections.

Enabling Operational Intelligence