PC Review


Reply
Thread Tools Rate Thread

Re: Connection string setting for DataAdapter

 
 
Carl Prothman [MVP]
Guest
Posts: n/a
 
      23rd May 2004
Priya via .NET 247 wrote:
> 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.
>


Priya,
If you have a SqlConnection object on the form (along with the SqlDataAdapters),
then open the SqlConnection's properties, then open Dynamic Properties,
then click in the ConnectionString property. A "..." button will show up.
Click on it. If you then select "Map property to a key in configuration file"
option and select a key, the SqlConnection will then use the connection string
in the web.config file. Do this for each page that had a SqlConnection
object on the WebForm. Enjoy!

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP

Hire top-notch developers at
http://www.able-consulting.com


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting the connection string to a QueryTable.refresh Candyman Microsoft Excel Programming 1 27th Jun 2009 07:38 AM
DataAdapter is not using correct connection string Andi Microsoft ADO .NET 3 5th May 2005 06:59 PM
dataadapter wizard connection string =?Utf-8?B?am9obiBzbWl0aGVycw==?= Microsoft ASP .NET 5 6th Sep 2004 04:08 PM
Re: SQL Connection String - Setting ANSI NULLS to OFF William \(Bill\) Vaughn Microsoft ADO .NET 4 12th Jul 2004 08:24 PM
Re: Connection string setting for DataAdapter Pete Wright Microsoft ADO .NET 0 22nd May 2004 09:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:55 AM.