KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to set up Automatic Connection in a merged Client/Server App
PRODUCT: 4D Server | VERSION: 11.2 | PLATFORM: Mac & Win
Published On: November 20, 2008

After building a Client/Server application in 4D v11 SQL, to be able to automatically connect to the server without having to enter the IP address or the port number, create a file called "EnginedServer.4dlink". It is an XML file formatted as shown here:

<?xml version="1.0" encoding="UTF-8"?>
<database_shortcut is_remote="true" server_database_name="application name here" server_path="ipaddress:port"/>

Fill in your application name and IP address in the appropriate areas. Then put this file in a folder named "Database" within the Client Application.

Commented by Thomas Fitch on April 2, 2009 at 2:50 PM
You can copy the format of the 4DLINK files in your 4D "Favorites v11" folder. This is in different places on different OS's, but it is part of the Application Data stored by 4D. If you connect to a database once and save the password it actually creates a link file with everything you will need.

Check out this Tech Tip to see where the Favorites v11 folder is on your machine:

http://kb.4d.com/search/assetid=75202
Commented by Silvio Belini on February 18, 2009 at 9:00 AM
This is very practical as the automated connection makes things simpler to the client user. Note that if the Server IP address or port# changes, the EnginedServer.4dlink file must be updated.