Hi Manish,
I fail to see your problem. You say you have two different C# applications,
and two different SQL server instances? Why do you need to rewrite anything
to run the programs? Or do you have a single SQL server instance and rename
this instance for each of the applications, with one application using one
instance name and the other application using another?! If the latter is
true why can't you use the same sql server name as the other program?
The connection strings should for each of the programs be put in a Setting
and available in the app/web.config file for the applications. You could
then either just rewrite the connectionstrin g for either of the applications,
or encrypt the connection string and maybe have the sql server instance name
in a separate setting and dynamically create the connectionstrin g at runtime.
If this doesn't answer your question, please clarify your problem with added
information.
--
Happy Coding!
Morten Wennevik [C# MVP]
"Manish" wrote:
Hi
i have a problem where as i want to use two different C# net program
in a single system where i have used 2 different sql server name. when
i execute those program each time iam renaming the sql server name and
executing the programs. Is there any way where i can write a
connection string without using a sql server name or is there any
other possibility to solve this problem.
[Note : i don't want to use the same sql serve name for both the
programs.]