Dec 6, 2016

Read Profile Settings from ISO SDK App

Background

Accessing  Web Services, external data sources from a SDK app is common like other technologies do. To store these access points, parameters etc. can be done in various ways. In a .net application common scenario is store then in the .config file or setting file. Why we want to do like this is, avoid hassles of deployment. When ISO SDK application is considered, we can achieve same thing by using .manifest file.

Problem

I need to get database connection string from the M3 profile.

Solution

  1. Using Profile Editor, add a setting to store database connection string. For this example, I’m going to use setting name as “DbConnection”.
    image
  2. Use the following code to extract above information.
    txtDBConStr.Text= ApplicationServices.SystemProfile.GetProperty("M3", "SDKApp", "DbConnection");
    

No comments: