Solved

Setup a Local db for development

Posted on 2004-04-01
2
176 Views
Last Modified: 2010-04-25
I have sql installed on my development (local) workstation. I have the test server for dwmx2k (patched) configured so it's hitting my local copy of IIS. I'd like to define stuff so that, while working against my test server the pages connect to my local (test) db. Do i have any choice except to be manually editing the db connections for which ever mode i want to be operating in?
0
Comment
Question by:juststeve
2 Comments
 
LVL 23

Expert Comment

by:adilkhan
ID: 10733351
I believe you have to Manually Edit.
0
 
LVL 8

Accepted Solution

by:
alexhogan earned 250 total points
ID: 10735518
I have several projects that I run that use development and production areas and backends.  This is something that I do in order to make that distinction without having to re-write any code or even modify it until the website/applicaton's release.

Depending on the technology that you're using the syntax may differ drastically so I'll only include pseudo code in this answer.

What you want to do is have the page(s) identify where they are being run. (i.e. local or remote)

$location = path for local testing

if($where_am_I == $location){
    connection code to local database
}
else{
    connection code to remote database
}
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now