Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > point to another server of an installed program created using VS2005 C#
 

point to another server of an installed program created using VS2005 C#

hi guys, im developing a program using VS2005 C# windows application

and i want to know how to make the program

ready to install .exe, in short the build exe,

to point to whatever server that has an SQL database

i have no problems creating an .exe

the only thing that concerns me is how about the database is moved and the DataSource specified in the connection string is no longer the path.

after you install the build .exe in to your computer, you will notice that there is an .xml file there

i tried changing its DataSource, for example from ServerA to ServerB and hora,

the program encountered an exception.

sairenji  Friday, August 14, 2009 3:41 AM
Hi sairenji,

I quite understand you are facing an annoying problem and this problem have been asked some times on MSDN forum. DataSet doesn't naturally support change connection string which result the problem to point to different server. Here is a workaround to fix the problem.

http://stackoverflow.com/questions/435444/changing-xsd-connectionstring-at-runtime-for-a-multitenant-app
That seems a better solution. It first mark ConnectionModifier as public so it can be changed at run time when you use that Adapter.

If you have any problem, please feel free to tell me.

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Monday, August 17, 2009 5:54 AM
Hi sairenji,

I quite understand you are facing an annoying problem and this problem have been asked some times on MSDN forum. DataSet doesn't naturally support change connection string which result the problem to point to different server. Here is a workaround to fix the problem.

http://stackoverflow.com/questions/435444/changing-xsd-connectionstring-at-runtime-for-a-multitenant-app
That seems a better solution. It first mark ConnectionModifier as public so it can be changed at run time when you use that Adapter.

If you have any problem, please feel free to tell me.

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
hi kira qian, i've just red ur reply because i was absent for 2 days, due to sickness
i've also checked the site you gave, i noticed that they are talking about query block
do you have an idea with it? because im unfamiliar with that.

sairenji  Wednesday, August 19, 2009 12:37 AM

You can use google to search for other answers

Custom Search

More Threads

• How to add uninstall file in the setup of windows apllication?
• Application has FileNotFound Error After Deployment?
• exclude office.dll from application files, but still in manifest
• monitor windows installer
• VS 2003-generated MSI doesn't remove Add/Remove Programs entry for the same app installed by VS 2003-generated MSI
• Smart Client update problem through Programatic Updates
• VS2008 Setup & Deployment Requires .NET 3.5
• Office add-In deployment Questions
• Clickonce directory structure help needed!
• Program does not find database