Can 2 db connections be bad for one asp page?

Results 1 to 3 of 3

Thread: Can 2 db connections be bad for one asp page?

  1. #1
    JoelH Guest

    Default Can 2 db connections be bad for one asp page?

    Ok, this might sound like a silly question. I was wondering this after I received help earlier. I have a form that updates info to a db for the site. It&#039s only going to be used by one person.<BR><BR>Thing is, It uses includes so I have ONE connection to put form data in, and the include brings OTHER db connection so I can pull records for pulldown menus..and THAT pulldown value is entered as a form value. Hence, 2 db connections, one using include.<BR><BR>HOWEVER, I&#039d rather just code BOTH connections, meaning open connection for inserting records, but IN the form, before my pulldown select code, I want another connection open to query records..and in the end close both.<BR><BR>Is that a good idea, used only by one person, or is that bad coding? To have 2 open connections to 2 different db&#039s, where one is to receive data, the other, to pull data.<BR><BR>I just want to do that and not worry about performance.<BR><BR>Thanks. I am TIRED of include files.

  2. #2
    Join Date
    Dec 1969

    Default probably not...

    If you are using two different DBs, then you have no choice: two connections.<BR><BR>But you need to ask yourself "Why am I using two DBs instead of two tables in the same DB?" Unless you have a really good answer, then maybe you should re-examine what you are doing.<BR><BR>But to answer your real question: Think of it this way, two connections on one ASP page simply means you can half as many simultaneous users of the database(s). Unless you are on a *really* busy site, this is probably a non-issue.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: probably not...

    Thanks. It can&#039t be 2 tables, as that info will be used for visitors and when it gets to be heavy traffic, they&#039d be pulling info from one table, THEN another almost at the same time.<BR><BR>It would mean more include files, more headaches.<BR><BR>But luckily, I can use this one page to connect to one to insert data, and connect to another to pull data FOR that form.<BR><BR>Thanks, Bill.

Posting Permissions

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