Solved

Setup a Local db for development

Posted on 2004-04-01
2
197 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:Saqib Khan
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
breathing space around footer 13 262
Refreshing remote files display in Dreamweaver and FileZilla 10 377
div id bookmark tag not working in Firefox 15 563
Replace Dreamweaver with what? 8 166
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 article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 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