DataServicesFactory.Create() - What application should I use to create DataServices?

Hi all,

The first parameter of the DataServicesFactory.Create() method is an application code (string).
What code should I use? What is it used for?

Also, TimeSeriesDataService doesn't work (no data) if I use a special character (e.g. '&') in this code. What are the authorized characters?

Thanks.

Best Answer

  • The first parameter of Create() is used for diagnostic purpose, for example to identify applications that erroneously subscribe to a huge number of rics and as a result may undermine Eikon quality and responsiveness.

    Constraints on this application code are described in the exception retrieved in the error callback, as shown below (that will be in the Data API Guide too). Running this code, you'll see an error message containing:

    > Invalid appCode: unable to trim
    > appCode automatically; it must contain
    > only alphanumeric values and must have
    > a length between 1 and 21 characters

    private void InitializeDataServices()
    {
    DataServicesFactory.Create("Olivier&Code",
    this.OnDataServicesCreated,
    this.OnDataServicesError);
    }


    // Error if something goes wrong.
    private void OnDataServicesError(AggregateException exception)
    {
    MessageBox.Show(exception.GetBaseException().ToString(), "DataServices connectivity error",
    MessageBoxButton.OK, MessageBoxImage.Error);
    }

Answers