question

Upvote
Accepted
942 9 9 14

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.
eikonapieikon-app-studio
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvote
Accepted
219 1 3 7

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); }

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks Denis, That's crystal clear.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.