M
Matt
Hello,
What is the best way to handle the database connection string for a class
library project that will be compiled and used as a .dll? This .dll will be
accessed via classic ASP and in the future by ASP.NET pages. I have created
a constant that contains the connection string (as shown below).
Private Const sConnStr As String =
"Server=ServerA;Database=Intranet;Uid=username;Pwd=password"
This connection string is for the development server. When I deploy to the
production server I don't want to change the connection string to the
Production server's credentials. I am new to creating a.dll so please bear
with me here. I am a web programmer. In my classic ASP I utilize Server_Name
scripts to set the proper connection string based on the server the
application is running on. Is there a similar method to accomplish this
within a .dll? I know from my ASP.NET pages I could use the web.config file
but I can't do that from classic ASP pages. I want to maintain the
connection string within the dll itself. Any detailed examples or a link in
the right direction would be much appreciated.
Thanks in advance,
Matt
What is the best way to handle the database connection string for a class
library project that will be compiled and used as a .dll? This .dll will be
accessed via classic ASP and in the future by ASP.NET pages. I have created
a constant that contains the connection string (as shown below).
Private Const sConnStr As String =
"Server=ServerA;Database=Intranet;Uid=username;Pwd=password"
This connection string is for the development server. When I deploy to the
production server I don't want to change the connection string to the
Production server's credentials. I am new to creating a.dll so please bear
with me here. I am a web programmer. In my classic ASP I utilize Server_Name
scripts to set the proper connection string based on the server the
application is running on. Is there a similar method to accomplish this
within a .dll? I know from my ASP.NET pages I could use the web.config file
but I can't do that from classic ASP pages. I want to maintain the
connection string within the dll itself. Any detailed examples or a link in
the right direction would be much appreciated.
Thanks in advance,
Matt