Making a database connection global



Web Solution

Goal: Have a global database connection
Why: (There will be 30+ tables, represented by 30+ classes) I only want to
reference the database connection once.

I put the connection string in the web.config.
I created a class with a static database connection and the class opens and
closes the database.

This seems to work so the question: Is there a better way to handle the
database connection?

Thanks In Advance.


.



Relevant Pages

  • Need Thorough Explanation Securing Applications Database Connection String
    ... How can I secure my application's database connection string and prevent ... You have a handful of options if you want to secure your database connection ... The assembly can live in the Global Assembly Cache (GAC) and can use the ... approved assemblies that can have a database connection. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connection string configuration
    ... this will help you to configure SSO ... I'm in the process of creating a map, and one of my requirements is to go to ... connection string in the map, I've written a C function which reads an xml ... Is their a better way of handling database connection strings? ...
    (microsoft.public.biztalk.general)
  • Re: Visual C++ 6 and ODBC
    ... > What's your connection string look like. ... > databases and others via ODBC drivers that are installed on the ... >>> I'm writing to ask if anyione has any information on how to get an ODBC ... >>> and have managed to get a database connection up and running using the ...
    (microsoft.public.data.odbc)
  • Re: Database Connections
    ... to the web config? ... >I like to store connection strings in the web.config file. ... > the connection string you can encrypt it via the Data Protection API ... >> place to store and retrieve this database connection string? ...
    (microsoft.public.sharepoint.portalserver.development)
  • Database Connections
    ... I have a custom web part that is accessing my database. ... place to store and retrieve this database connection string? ...
    (microsoft.public.sharepoint.portalserver.development)

Loading