ini file information in ACE

Discussion created by cjrancur on Nov 6, 2009
Latest reply on Nov 6, 2009 by spilon2

Where should information that was previously in a VB6 type of ini file be placed in ACE?  While upgrading from a VB6 application to VB.net, and also moving it to ACE, I am trying to decide whether to put ini file information.  Maybe some of it should be placed directly under the main ACE class, some under my.settings, and some defined within the ACE calculation subroutine.  Can someone address this in general principles, and with the following examples, also.


Here's the first example. The former vb6 app had one item in it's ini file called iniRollOverDay, which was a 27 character string of value "Sun,Mon,Tue,Wed,Thu,Fri,Sat".  Leaving aside the question of whether this even needs to be initialized any more with the day functions in vb.net, just consider this an example.  I'd say this doesn't need to go in my.settings, since it will never, ever be changed.  (Actually, this string may be revised to other languages like Spanish, etc. for certain of our sites, so I must rephrase and never say never).  It probably will go in the general class declarations for ACE as a Friend string, since it may well be used by several functions and subroutines.  On our local servers, this will never be changed.  if the application is moved to a different PI server in a different language setting, this may be changed changed to fit the language used at the plant.


Another example would be a database connection string.  A database connection string may change as servers are updated over the years.  I'd tend to put that into my.settings.  Comments?Agree?Disagree?  Other suggestions for the appropriate location for a database connection string within ACE?


Another example might be the frequency of data transfer between a relational database and a PI tag.  Here I think that the appropriate location depends on context.  Probably under the general ACE class declarations as friend, but maybe only under the ACE Calculations subroutine, if it is only used there.  Maybe it is not needed at all, because it could be tied directly to the ACE clock schedule, and not used within the calculations.  Is there a way to retrieve the ACE clock schedule for use within subroutines and functions included in the executable or module?


Comments and Suggestions are requested.