Dynamic Connection String
-
-
Hi, I am developing a web application using c#. My application login form takes 4 values like Server Name, Database Name, UserName, and Password. I want to create a connectionstring based on this values in log form at runtime. Thanks in advance Hari
A connection string is just a string. You can just build it in memory, the trick is, you need to store it somewhere ( the session, probably ), in order for it to then be available when you want to use it.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
A connection string is just a string. You can just build it in memory, the trick is, you need to store it somewhere ( the session, probably ), in order for it to then be available when you want to use it.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Theres also a handy ConnectionStringBuilder class. See here http://msdn2.microsoft.com/en-us/library/ms254978(VS.80).aspx[^]
Mark Churchill Director Dunn & Churchill