Connecting Tech Pros Worldwide Help | Site Map

I want to make common connection string for database

Alex Smith
Guest
 
Posts: n/a
#1: Nov 17 '05
Hi Friends

I want to make common connection string for database. I can not use Web
config file, so please give idea excluding web.config file.

Thanks.

Alex


Moty Michaely
Guest
 
Posts: n/a
#2: Nov 17 '05

re: I want to make common connection string for database


Do you mean dynamically?

Or is it going to be static?

"Alex Smith" <sam@gmail.com> wrote in message
news:uKP7VcydFHA.2556@TK2MSFTNGP10.phx.gbl...[color=blue]
> Hi Friends
>
> I want to make common connection string for database. I can not use Web
> config file, so please give idea excluding web.config file.
>
> Thanks.
>
> Alex
>
>[/color]


Salvador
Guest
 
Posts: n/a
#3: Nov 17 '05

re: I want to make common connection string for database


Hi,

1) You can serialize a string into a file using the XML format so you can
access externally, everytime the app runs you deserialize the file with the
content.

2) You can save it to a file, it can be encrypted if you use a CryptoStream,
the problem with this is that you can not modify externally.

3) You can hardcoded on your code as a constant

4) You can create a service that publishes data, one of those can be the
connection string, this will be a usuful way to share across applications and
they will be using always the latest one.

5) If you don't want to create a service it can be a component installed on
the GAC, the problem is that it will work only for that machine.

Hope this helps
Salva


--
Salvador Alvarez Patuel
Exony Ltd - London, UK


"Alex Smith" wrote:
[color=blue]
> Hi Friends
>
> I want to make common connection string for database. I can not use Web
> config file, so please give idea excluding web.config file.
>
> Thanks.
>
> Alex
>
>
>[/color]
Closed Thread