Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dataset connection string different from development to production 1

Status
Not open for further replies.

SASCons

Programmer
Apr 14, 2006
6
US
I am having a big issue with this problem. One of my forms are using the binding source with a strong-typed dataset. When I am creating the data set using Studio.NET 2005 I am prompted to select a connection string. I am only given choices that are connection strings from the application settings. My issue is that my deployment configuration (Where my DB is stroed and the name of the DB) is deifferent from the dployment configuration. I need to be able to somehow tell the program to use my local configuration and when I deploy it to use a different configuration. In ASP.NET when you add a DataSource there is an option to add a Database Object that allows you to creat your own DB object. Is there a way to do this in VB.NET. The Connection string property in the Application settings are only readonly.


Thanks
 
Try using a .config file, which is a text file. Your program can call the local file relative to its location.

I use this for my web.config files. On my the live server it is pointing to production and on my development server it is pointing to testing.

I hope this helps.

Babloome
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top