One ASP Site...Multiple Databases

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default One ASP Site...Multiple Databases

    I am developing an ASP Program that will be used by many people. I only want
    to have one site but have each person have their own database that the site
    runs from.

    For example:
    Person 1 Database = dbp1
    Person 2 Database = dbp2
    Person 3 Database = dbp3

    I have a 'common' dbase that contains the user and the dbase they are to
    use. When they log in I need to associate their dbase with them, in a
    session variable perhaps?

    What would be the best way to do this?

    Thanks,

    Mike


    Mike Hill Guest

  2. Similar Questions and Discussions

    1. Multiple Site?????
      I have a web server that is currently set to host one website through the web publishing server. I need to set up additional sites. So currently I...
    2. multiple databases
      Hi, How can I set up PHP to work with multiple databases in the same page? (not tables)
    3. Query using multiple databases?
      I also need help in joining tables from multiple databases. Using CF5. The last post here says to use dot-dot notation. But that doesn't work for...
    4. Federated Databases, joins across databases etc
      Greetings, I want to do a join between 2 tables on 2 different db2 databases on the same server. I assume that I have to use federated databases. I...
    5. [PHP] multiple databases
      On Jul 16, 2003, "Paulo Neves" claimed that: |Hi, | |How can I set up PHP to work with multiple databases in the same page? |(not tables) |...
  3. #2

    Default Re: One ASP Site...Multiple Databases

    On Thu, 15 Apr 2004 11:17:25 -0600, "Mike Hill"
    <mhill7272(at)hotmail.com> wrote:
    >I am developing an ASP Program that will be used by many people. I only want
    >to have one site but have each person have their own database that the site
    >runs from.
    >
    >For example:
    > Person 1 Database = dbp1
    > Person 2 Database = dbp2
    > Person 3 Database = dbp3
    >
    >I have a 'common' dbase that contains the user and the dbase they are to
    >use. When they log in I need to associate their dbase with them, in a
    >session variable perhaps?
    >
    >What would be the best way to do this?
    One database with information for multiple users, but you don't give
    any information on what the database contains or why you think you
    need sepaarte ones.

    If you definitely need them as separate, you need to authenticate the
    user and assign a connection based on the user.

    Jeff
    Jeff Cochran Guest

  4. #3

    Default Re: One ASP Site...Multiple Databases

    >I am developing an ASP Program that will be used by many people. I only
    >want
    > to have one site but have each person have their own database that the
    > site
    > runs from.
    Why? Could you explain further please?

    From what you've described so far, I don't see the need for more than one
    table, never mind more than one database.

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]


    Aaron Bertrand [MVP] Guest

  5. #4

    Default Re: One ASP Site...Multiple Databases


    "Mike Hill" <mhill7272(at)hotmail.com> wrote in message
    news:uwa6F2wIEHA.3432@tk2msftngp13.phx.gbl...
    > I am developing an ASP Program that will be used by many people. I only
    want
    > to have one site but have each person have their own database that the
    site
    > runs from.
    >
    > For example:
    > Person 1 Database = dbp1
    > Person 2 Database = dbp2
    > Person 3 Database = dbp3
    >
    > I have a 'common' dbase that contains the user and the dbase they are to
    > use. When they log in I need to associate their dbase with them, in a
    > session variable perhaps?
    >
    > What would be the best way to do this?
    In ASP it's always a good idea to create your database connection when you
    need it, and close it asap afterwards, leaving it open as short as possible.
    Storing ADO connection objects in the ASP session object is a no-no.

    So what I would do is determine the database per user when the users session
    is created (Session_onStart event in global.asa), and store the connection
    string in the session. Whenever you need to connect to the user-specific
    database in your pages, use this connection string.




    J. Baute Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139