StrataFrame Forum

setting APP_NAME using SF tools

http://forum.strataframe.net/Topic29203.aspx

By Keith Chisarik - 12/10/2010

Is there a way using either SF Connection manager or Shared settings file to set the value for APP_NAME? It is normally set via the connection string (;Application Name=MyAppName)

Thanks
By Greg McGuffey - 12/21/2010

Sorry I missed this. I don't think there is way to have that set with either the connection manager or shared settings file, but I'm asking Trent about it.

Another possibility is to just manually add it to the connection string after it has been set by either one of these. I.e. all either of these tools do is set a connection string. You can modify it at will.

public static void SetDataSources()
{
    //-- Get connection string however you desire...
    //       connection manager or shared settings...
   ConnectionManager.SetConnections();

    //-- Now that it is set, just add the app_name to it.
    DataLayer.DataSources[""].ConnectionString += ";Application Name=MyApp;";
}