Connecting Tech Pros Worldwide Help | Site Map

Urgent help - setup test environment

Member
 
Join Date: Nov 2007
Posts: 77
#1: Jan 2 '08
I am new to ASP, but been asked to look into a production issue.
I was looking at the code and found this,

data_source = "driver={Microsoft Access Driver (*.mdb)};dbq=d:\database\clienthomedbo.mdb"

I would like to create a test environment in my C drive. So I copied all active server pages from the prodcution drive (D drive) to my C drive. I was going into each active server page code and changing d:\database\ to c:\work\projects\database\ inorder to point to my test environment which is my C drive. I have almost 200 active server pages. My question is is there a better way to setup my test environment other than copying all to my drive and then going in and changing the path?

Please treat this as urgent.

Thanks
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#2: Jan 3 '08

re: Urgent help - setup test environment


The better way to do this is set up a data source name "DSN" in control panel -> administrative tools -> Data sources, then you only need to refer to the data source name in your scripts and you only need to change its location once. Now that your scripts have already been written with a long file path, I don't see an easy way around going into each of them and changing them individually. Of course, you could write a script to make the change in each of them... Let me know if this answers your question.

Jared
Reply