R
RB0135
Hi,
I hope I worded the subject correctly.
Under VS2005, I have created the wizard to add a datasource that
connects to my SQL2005 server. I ran through the wizard and this
created a Dataset, a BindingSource and TableAdpater.
I noticed in the file App.Config, it created an entry under MYSETTINGS
for called xxxx.My.MySettings.xxxConnectionString with a connection
string parameter.
So far, this is great and on the development PC (mine) this works
perfectly.
Of course, when it goes into Production I need the server in the
connection string to be dynamic. The reason being is the program is
launched with args and one of the args determines which server to
access to get the data from. Of course, the development PC is NOT one
of those that can get the data.
I have searched but most people seem to talk about changing the
App.Config file (well, the XML file) yet that requires an application
restart.
I know that the App.Config parameter is read only, but is there anyway
to override this and tell the Datasource to use the dynamically
created connection string?
Any help???
Thanks,
Robert
I hope I worded the subject correctly.
Under VS2005, I have created the wizard to add a datasource that
connects to my SQL2005 server. I ran through the wizard and this
created a Dataset, a BindingSource and TableAdpater.
I noticed in the file App.Config, it created an entry under MYSETTINGS
for called xxxx.My.MySettings.xxxConnectionString with a connection
string parameter.
So far, this is great and on the development PC (mine) this works
perfectly.
Of course, when it goes into Production I need the server in the
connection string to be dynamic. The reason being is the program is
launched with args and one of the args determines which server to
access to get the data from. Of course, the development PC is NOT one
of those that can get the data.
I have searched but most people seem to talk about changing the
App.Config file (well, the XML file) yet that requires an application
restart.
I know that the App.Config parameter is read only, but is there anyway
to override this and tell the Datasource to use the dynamically
created connection string?
Any help???
Thanks,
Robert