You tried to add a link
`System.Configuration`
Help folder on you.
Just right-click the folder with your links in your project, then click the link. and then find System.Configuration, then ok.
then add
Imports System.Configuration
in your form
Change the application configuration to this:
<connectionStrings> <add name="SQLConnStr" connectionString="Data Source=HOTEL_MySQLSERVERR;Initial Catalog=GuestBooking;User ID=xyz;Password=xyz" providerName="System.Data.SqlClient" /> </connectionStrings>
// your application configuration name and connection string name must be the same
add name = "SQLConnStr"
ConnectionStrings ("SQLConnStr").
SQLConnStr= ConfigurationManager.ConnectionStrings("SQLConnStr").ConnectionString
and look at this:
Fix Name 'ConfigurationManager does not report an error
Hello
source share