PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Re: Connection string setting for DataAdapter
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Re: Connection string setting for DataAdapter
![]() |
Re: Connection string setting for DataAdapter |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
A common way to solve this problem is to write a single function to return a
connection. The function will retrieve the appropriate connection string from whatever configuration source you are using, and build a connection object. The connection object can then be set onto the commands in your dataadapters. By keeping connection handling code in just one place in your application you minimize the risk of having to make major changes to your code if something changes. -- -------------------------------------------------------- Peter Wright (www.petewright.org) Author of ADO.NET Novice To Pro From Apress. www.apress.com "Priya via .NET 247" <anonymous@dotnet247.com> wrote in message news:uUjr2zCQEHA.2468@TK2MSFTNGP11.phx.gbl... (Type your message here) Hi, In our project we have more than 20 DataAdapters. I created connection parameters in web.config file. If i have to change the connecting string for all the DataAdapter do i have to manually change in the properties. Is there any other alternative way to achieve the same. I am expecting a easy way through which whenever i changed in the web.config all the data adapters as to point to the same settings. Thanks for your help. From: Priya ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>pobf56+q10Wy0yxekwJhGg==</Id> |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

