Setting a connection string to connect to either Access or Sql Ser

J

Jack

Hi,
In a asp project I am required to come up with a solution where the
administrator of the sytem should be able to set the desired connection
string by checking one of two options (access or sql server). The
connection.asp is a asp page that holds the connection strings. I am trying
to get the value of chosen option to write a if statement in the connection
string. ie. if -- then connstring else connstring

However, I am wondering how does one store the value of the chosen opton to
use it in the connection.asp without using a session variable. Any help is
appreciate. Thanks.
 
B

Bob Barrows [MVP]

Jack said:
Hi,
In a asp project I am required to come up with a solution where the
administrator of the sytem should be able to set the desired
connection string by checking one of two options (access or sql
server). The connection.asp is a asp page that holds the connection
strings. I am trying to get the value of chosen option to write a if
statement in the connection string. ie. if -- then connstring else
connstring

However, I am wondering how does one store the value of the chosen
opton to use it in the connection.asp without using a session
variable. Any help is appreciate. Thanks.
Several options, in order of my preference:
1. store it in a file on the server, either a text file, an xml file or even
an Access database
2. Pass it around to all subsequent pages using a querystring variable or a
hidden form variable
3. Use a cookie

Bob Barrows
 
J

Jack

Thanks for your advise for the resolution of the probelm Bob. I appreciate
it. Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top