Solved

Setup a Local db for development

Posted on 2004-04-01
2
188 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

911 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

25 Experts available now in Live!

Get 1:1 Help Now