suppose your asp program is stored under root directory named httpdocs
now , create a virtual folder (inside httpdocs) let's say includeasp that points to a folder named cgi-bin(which is in the same folder as httpdocs).
means the directory tree should be like this
somefolder
httpdocs cgi-bin
(your asp files) (contains password inside global.asp file)
httpdocs and cgi-bin are brother folders
then in the folder cgi-bin, create an asp program global.asp with following code
global_id="yourdatabaseid"
global_password="yourdatabasepassword"
once this file is created, then in your asp program that contains connectionstring value for database, write this line before tag starts as comment of html
#include virtual="/includesasp/global.asp"
now the variables global_id abd global_password are available and you can specify them inside your connectionstring.
So simple....moreover, if a hacker somehjow downloads this asp code, thenhe will not be able to see database id and password.
it is guaranteed that since the folder cgi-bin is not there inside httpdocs folder, so hacker cannnot copy that file which contains actual id and password