Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set connection string using config file
Message
From
20/03/2008 00:26:02
 
 
To
19/03/2008 13:48:40
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
01303511
Message ID:
01303745
Views:
12
I don't use TableAdapters, but I think they get their connection string the same way that DataAdapters do, from the app.config (or the web.config for a Web Service or Web App).

See Message #1300597 for the syntax for accessing that setting.

~~Bonnie




>I am using VS2005. I have created a strongly type dataset(XSD) with many different table adapters. When defining my table adapters, I set the Connection property to either my production or development SQL Server database. I do this through the property sheet at design time.
>
>How can I set the connection string using the connection string property that is in the app.config file?
>
>Currently, in order to switch from the DEV to PROD SQL Server databases, I have to change the Connection property for each table adapter. Is there a way to make every table adapter read it's connection string from the config file?
>
>Thanks,
>
>Jerry
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform