switching from test to production and db connections

G

Guest

I have a project that i built using vs.net. The database connections were
created using drag and drop. Rather than deleting the connections and
re-creating the connections to the production server what is the recomended
way to make this connection dynamic based upon the host (or other) name. I
realize that the initial connection will need to be created and modified
using some variables, but would like to know the best place to do this and if
there is an artical ourt there that describes this?
thanks
 
S

S. Justin Gengo

Kes,

The recommended method is to store the connection string in the appsettings
section of the web.config file.

Do a search for ASP.NET database connection string web.config and you'll get
plenty of articles. I tested that search phrase on google and got more
articles than I have time to paste here. :)

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
E

Eliyahu Goldin

The standard place for keeping connection string parameters is the
web.config file.

Eliyahu
 
S

Scott Allen

I have a project that i built using vs.net. The database connections were
created using drag and drop. Rather than deleting the connections and
re-creating the connections to the production server what is the recomended
way to make this connection dynamic based upon the host (or other) name. I
realize that the initial connection will need to be created and modified
using some variables, but would like to know the best place to do this and if
there is an artical ourt there that describes this?
thanks

I have a brief article here, with a tip on breaking out application
settings into seperate files so you can have a file for development,
for test, production, etc.

http://odetocode.com/Articles/345.aspx
 
G

Guest

This works fine for connections developed programmatically. But, how about
for those connections created directly on a form via the SQLConnection (for
example) tool?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top