Change connector when uploaded to EM server

When I build Easymorph projects in the desktop app, I specify SQL server connector, e.g. myserver.com, username=john, pass=123

When I copy this project to EM server, I want to change this connector to use different server, username, and pass, e.g.
server=10.0.0.1, username=easymorph, pass=456

How can I do this?

In general, we recommend keeping connector names the same but instead switch between connector repositories. For instance, when a project is developed in Desktop the current repository has a connector names “maindb” pointing to a DEV server.

Meanwhile, the Server has another repository with a connector also called “maindb” but pointing to a PROD server. In this case, when you publish a project from Desktop to Server, no connector name change required. The connector name remains the same, but it points to different servers in different environments (dev/test/prod/etc.).

Note that connector names can be specified using a parameter. E.g. in a query the name of connector can be provided using a parameter (see below)
image

If you still want to dynamically change the name of a connector used in a project, then you can specify the connector name using a parameter, and then run change the parameter in a Server task that uses the project.

Finally, you can dynamically calculate connector name using a calculated parameter and the system() function. For instance:

if( system('user') = 'LocalService', 'proddb', 'devdb')

@dgudkov thanks.

For this approach

Meanwhile, the Server has another repository with a connector also called “maindb” but pointing to a PROD server. In this case, when you publish a project from Desktop to Server, no connector name change required. The connector name remains the same, but it points to different servers in different environments (dev/test/prod/etc.).

How do I modify connectors on the server?
I have this repository, do I need to upload a new one from desktop app somehow?

You can edit and upload a repository manually, using the “Upload” button visible on the screenshot you posted.

However, a more convenient way is to connect Desktop to Server and edit Server repositories right from Desktop. Here is how to do it:

1) Enable repository access for Desktop users on Server

The option is in the space settings. By default it’s disabled so you have to enable it.

2) Configure Server Link in EasyMorph Desktop

See here how to set up Server Link in Desktop: Server Link explained

Notice that Server Link can be configured for accessing multiple spaces. The current space for Server Link is selected on the Start page.

image

3) In the Connector Manager switch to a Server-hosted repository

Open the Connector Manager and switch Desktop to using the connecor repository provided by Server via Server Link.

Now you can edit Server-hosted connectors normally, right from Desktop.

Note that now all projects that are running on Desktop will use connectors provided by Server. You can always see the current connector repository in the application status bar.
image