473,385 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Switching between Development and live

Hello,
I have an app where I am switching between development mode and live mode,
phyically seperate networks. What I would like to try and figure out is,
how can I have my app know which db server to hit? Right now, I just change
the connection string information that I have stored in the Settings....
These are SQL 2005 databases and the only difference is the Data Source.
Thanks,
Brian
Oct 10 '08 #1
2 1152

In the company i work for we have 3 DB systems
Production , Test and Development

sometimes we want to switch to another server , we solved this by changing
the hosts file ( we made a nice menu for this )

HTH
Michel Posseth [MCP]
http://www.vbdotnetcoder.com

"Brian" <bs********@community.nospamschreef in bericht
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hello,
I have an app where I am switching between development mode and live mode,
phyically seperate networks. What I would like to try and figure out is,
how can I have my app know which db server to hit? Right now, I just
change
the connection string information that I have stored in the Settings....
These are SQL 2005 databases and the only difference is the Data Source.
Thanks,
Brian

Oct 10 '08 #2
"Brian" <bs********@community.nospamwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hello,
I have an app where I am switching between development mode and live mode,
phyically seperate networks. What I would like to try and figure out is,
how can I have my app know which db server to hit? Right now, I just
change
the connection string information that I have stored in the Settings....
These are SQL 2005 databases and the only difference is the Data Source.
Thanks,
Brian
You could use the foloowing:

If System.Diagnostics.Debugger.IsAttached Then 'check if running in IDE

If My.Settings.TestMode Then

DB = My.Settings.DB8_Test

lblDB.Text = "DB: DB8_Test"

lblDB.ForeColor = Color.Blue

Else

DB = My.Settings.DB8

lblDB.Text = "DB: DB8"

lblDB.ForeColor = Color.Red

End If

Else

DB = My.Settings.DB8

lblDB.Text = "DB: DB8"

lblDB.ForeColor = Color.Red

End If
Oct 12 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Emily Jones | last post by:
Very strange one this. Application written in Access 2000. Runs in 2003 at client's site, 2000 on my development system. FE/BE system. The app's startup form sets a few options, opens the...
4
by: Richard Levasseur | last post by:
(Forewarning, most of these problems and solutions come from being the only developer in a 1 server department with no budget, few resources, unresponsive IT, and non-technical managers, so thats...
1
by: scottingim | last post by:
I have an ASP.NET web application, Bids. This application goes live on Monday. I would like to set up a development version, BidTest, on the same server. I have a website set up and can browse...
0
by: abdulics | last post by:
Hi, We have immediate openings with one of our Top Notch Telecom clients for their Research and Development Center in Bangalore. Please send me your detailed/brief profile to...
0
by: abdulics | last post by:
Hi, We have immediate openings with one of our Top Notch Telecom clients for their Research and Development Center in Bangalore. Our top notch and reputed client deliver complex IT solutions on...
29
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. How do I...
2
by: Frank Swarbrick | last post by:
I had asked a question a few weeks ago about having problems at times accessing DB2 Express-C 9.1, and getting "SQL1032N No start database manager command was issued. SQLSTATE=57019" even when the...
0
by: jconxus | last post by:
Mylinia.com Live purposefully! Who: Mylinia.com is a personal development company located in the heart of the Silicon Valley, started in 2006 by 3 Stanford business school students who are...
7
by: Danny | last post by:
Hello: I would like to develop a browser extension, or whatever such a thing is classified as, that would allow a user of IE6, and possibly IE7, to switch between a live and development page. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.