G
Guest
Hi - can anyone please help this is driving me up the wall!! I have a config file
<?xml version="1.0" encoding="utf-8"?><configuration><appSettings><add key="connectString" value="server=DEV1-SMCT\NIIR;database=DBName;uid=username;password=password" /></appSettings></configuration
(In final release I won't have passwords in this!!
And when I load my first form I try and retrieve the value usin
str_Connection = ConfigurationSettings.AppSettings("connectString"
And every time this returns Nothin
I also tried the line str_Connection = ConfigurationSettings.AppSettings.Item("connectString").ToString but just gives an error because the object is nothing
I hope someone can point the obvious that I must be missing!
Thank
Siobha
PS Apologies - I am posting this again as I originally posted as a response to someone elses old post - just in case it doesn't get spotted
<?xml version="1.0" encoding="utf-8"?><configuration><appSettings><add key="connectString" value="server=DEV1-SMCT\NIIR;database=DBName;uid=username;password=password" /></appSettings></configuration
(In final release I won't have passwords in this!!
And when I load my first form I try and retrieve the value usin
str_Connection = ConfigurationSettings.AppSettings("connectString"
And every time this returns Nothin
I also tried the line str_Connection = ConfigurationSettings.AppSettings.Item("connectString").ToString but just gives an error because the object is nothing
I hope someone can point the obvious that I must be missing!
Thank
Siobha
PS Apologies - I am posting this again as I originally posted as a response to someone elses old post - just in case it doesn't get spotted