Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can you show me how to use AppSettings to set connection string for my VB .NET application?

0
Posted

Can you show me how to use AppSettings to set connection string for my VB .NET application?

0

Before you build your project you need to define your connection string as Dim connectionString As String connectionString = Configuration.ConfigurationSettings.AppSettings(“ConnectionString”) ‘For VB .NET 1.x or connectionString = ConfigurationManager.AppSettings(“ConnectionString”) ‘For VB .NET 2.0 in your VB .NET applications and have an App.config file contains the code: VB .NET will generate a config file in the bin subfolder when you build the project. If you need to change the value of a key you change App.config before you build the project or change the config file in your bin subfolder after your application is built.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123