Can you show me how to use AppSettings to set connection string for my VB .NET application?
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:
Related Questions
- Its great that the application automatically adds some SQL code but is it possible to see exactly what the SQL injection string would be like before sending it?
- What are the best practices to follow to secure connection strings in an ASP.NET web application?
- Can you show me how to use AppSettings to set connection string for my VB .NET application?