Mattias Sjögren wrote:
Could somebody give and example of how to do it ?
System.Configuration.ConfigurationSettings.AppSett ings("Desvio")
Thanks for your reply.
I did in that way but it didn't worked and I'm going to be crazy !>..
I did:
Dim ConnectionString As String
Dim MargenString As String
Dim Desvio As String
Desvio = System.Configuration.ConfigurationSettings.AppSett ings("Desvio")
System.Console.WriteLine(Desvio)
MargenString =
System.Configuration.ConfigurationSettings.AppSett ings("MargenString")
System.Console.WriteLine(MargenString)
ConnectionString =
System.Configuration.ConfigurationSettings.AppSett ings("ConnectionString")
System.Console.WriteLine(ConnectionString)
--------------
and in config file I've:
<configuration>
<appSettings>
<add key="Desvio" value="652825616" />
<add key="MargenString" value="10" />
</appSettings>
</configuration>
But when I run my application I see:
---------
C:\tmp1>.\pruebaSQL.exe
Network Library=DBMSSOCN;Data Source=localhost;Initial atalog=segex;User
ID=sa;Password=sa
----------------
Program showed me the string of a parameter I deleted from config file
and didn't show me exsitent parameters !!!
How is posible ? Am I doing something wrong ? Is there a kind of cache
that keeps data ?
Thanks in advance
X