[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Setup a Local db for development

Posted on 2004-04-01
2
Medium Priority
?
246 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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