Config AppConfig = new Config(strConfigFileName); AppConfig.GroupName=""; string strKey = AppConfig.GetValue("databases",@"xCase\Connection",@"Data Source=c:\development\xcase7;Provider=VFPOLEDB.1");and
Config AppConfig = new Config(strConfigFileName); AppConfig.GroupName=""; AppConfig.SetValue("databases",@"xCase\Connection","Data Source="+strxCaseLocation+";Provider=VFPOLEDB.1");As you can see, I use it set set the string for a VFP free table directory, but this should give you enough pointers to make it work.
> <databases> > <add key="MyDB\Connection" value="server=(local);uid=zzz;pwd=aaaa;database=qqqqq;" /> > </databases> >>
> <databases> > <add key="MyDB\Connection" value="server=192.192.192.192;uid=joeSchmo;pwd=justJoe;database=RealTV;" /> > </databases> >>