Hi Lasse,
The server name is included as part of the connection string that is passed to the Open method when opening a connection to the SmartObject Server. You will need to determine the hostname of the K2 [blackpearl] server and include this as part of the connection string in your code.
There is a good code example in the K2 Developer Reference Guide that uses the SCConnectionStringBuilder class to build the connection string. The current version (0803 release) of the developer reference guide can be downloaded here:
https://portal.k2workflow.com/downloads/bp/Default.aspx
There are several code examples in SmartObjects -> Accessing/Managing sections.
The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.