Hi all
i have the Following App.Config file in VB2003 and a Windows Application.
and am Accessing this Connction string from the Vb App, like thisCode:<?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <!-- User application and configured property settings go here.--> <!-- Example: <add key="settingName" value="settingValue"/> --> <add key="timer.Enabled" value="True" /> <add key="timer.Interval" value="1000" /> <connectionstring> <add name = "Tshwane_Train" ConnectionString = "login=sa;Password=tfjgssf;Database=Tshwane_Valuations_Train; Server=SGIICOR"/> </connectionstring> </appSettings> </configuration>
Wheni compile the Application, i get no Errors ,but but when i try to run the application, i mean the Part that will need to Connect to the Database i get the Following Error.Code:Dim constr As String = Configuration.ConfigurationSettings.AppSettings("Tshwane_Train")
What is WrongCode:An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in system.dll Additional information: Unrecognized element




Reply With Quote