In ASP.NET i can store connection string in the web.config, like wise i need to store connection string or some configuration value in some file for classic ASP.
How can i do this? In order to achieve this do i need to use XML File and store the connection string in this?
What is the best practice???
Connection strings can be stored as key/value pairs in the connectionStrings section of the configuration element of an application configuration file.
Connection strings in configuration files are typically stored inside the <connectionStrings> element in the app. config for a Windows application, or the web. config file for an ASP.NET application.
The connection string should be added to your application's App. config file (Web. config if you are using ASP.NET). If your connection string contains sensitive information, such as username and password, you can protect the contents of the configuration file using Protected Configuration.
use globa.asa
to set a value in the application object.
You can make an ASP file that contains the connection string as a string variable, along with any other configuration information, then include it in files that connect to the database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With