I created a a new Data Source within a project of VS2005. I need to move the
database which the Data Source is based on to another server. However, I
can't find a property which allows the Data Source's connection to be changed
(seems that once it's set, the connection can't be altered). Of course the
connection string can be changed at runtime but I want to be able to Refresh
the Data Source/TypedDataset while in the Designer.
Should the connection string be changed by altering the appropriate Data
Connection in the Server Explorer?
Hi Michael,
>However, I can't find a property which allows the Data Source's
>connection to be changed (seems that once it's set, the
>connection can't be altered). Of course the connection string
>can be changed at runtime but I want to be able to Refresh
>the Data Source/TypedDataset while in the Designer.
Once the datasource is generated by the wizard, it would be integrated into
the target dataset, so there is no such property to change its connection
string in the design time.
On the other hand, since the corresponding connection string has been
stored in the the program's app.config file, I suggest you can modify its
<connectionStrings> entry directly in the app.config file.
Thanks!
Best regards,
Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
michael - 03 Jan 2006 11:04 GMT
If I'm like other developers, when I start a project, the db name and
location may change a couple of times before the project picks up steam.
Using a Data Source whose design time connection properties can't be changed
at this early stage is probably no big deal. But what happens months after
thousands of hours have been devoted to a project? A site change, a need to
change the Data Source location/db, how can this feature not be available at
design time?
I don't always save the connection string to the app.config. I also not sure
if this string is used during Design Time.

Signature
Michael Hockstein
> Hi Michael,
>
[quoted text clipped - 25 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Gary Chang[MSFT]" - 04 Jan 2006 02:52 GMT
Hi Michael,
>A site change, a need to change the Data Source location/db,
>how can this feature not be available at design time?
The data source is only active during the time when the wizard generates
it, then it would be converted to the xml entry in the app.config or the
corresponding code block of the application, so there is no way to config
the datasouce directly in the design time after it has been created, this
behavior is by design in VS2005.
In this scenario, if you do not want to change the corresponding hard code
in the app.config or the application program, I am afraid you need to
create a new dataset to bind the new datasource, but I think it may be a
more inconvenient approach.
Thanks for your understanding!
Best regards,
Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.