KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: An easy way of getting the Server Name for OP Find 4D Server
PRODUCT: 4D Open | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: June 9, 2000
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

If you are using version 6.5 network components, the value for the serverName parameter of the command OP Find 4D Server is different than it would be when using earlier versions of network components. Fortunately there is an easy way of find out what the value should be, when executing the code:

$NC:=GetCompID ("TCP")
$ErrCode:=OP Load network component ($NC)
$ErrCode:=OP Select 4D Server ($NC;serverName;ServerID)

4D Open will display a dialog asking you to select a database. After you have selected the database and closed the dialog, the serverName parameter will have the correct value to use with OP Find 4D Server. Copy the value of the serverName variable while in the debugger. Now go back to the method containing the 4D Open connection code. Replace the serverName variable with the value you copied in the debugger and change the name of the command from OP Select 4D Server to OP Find 4D Server.

$NC:=GetCompID ("TCP")
$ErrCode:=OP Load network component ($NC)
$ErrCode:=OP Find 4D Server ($NC;"Accounts.db AccountServer";ServerID)