How to maintain one database connection for an asp

Results 1 to 3 of 3

Thread: How to maintain one database connection for an asp

  1. #1
    Wenguang Guest

    Default How to maintain one database connection for an asp

    I wrote an asp server component to do some database<BR>operation. But I have 8 tables to open each time.<BR><BR>So I wonder if I have to connect to database and open<BR>these tables for each request. Is there a way that<BR>I can maintain a database connection and opened recordset<BR>in a component, and use them to serve all coming<BR>request?<BR><BR>I am using MFC to create the component code. I tried<BR>to add some initialize code in "InitInstance()", but<BR>I can not even register my component after that. What&#039s <BR>the problem?<BR><BR>Thanks for your help in advance.

  2. #2
    Mark Hoffman Guest

    Default RE: How to maintain one database connection for an

    If your site is going to be getting heavy hits, keeping those connections open will eat up considerable resources. Some folks say to always open and close as needed, and that is usually good advice. What type of database system are you using?<BR><BR>Mark Hoffman<BR>D Animation Multimedia and Web Design

  3. #3
    Wenguang Guest

    Default RE: How to maintain one database connection for an

    &#062;If your site is going to be getting heavy hits, keeping those &#062;connections open will eat up considerable resources. Some folks &#062;say to always open and close as needed, and that is usually &#062;good advice. What type of database system are you using?<BR><BR>I am using Microsoft SQL Server 7.0.<BR><BR>Do you mean maintaining one connection would consume more<BR>resource than opening/closing it each time? It&#039s opposite to<BR>my intuition. Since in the latter case, open/close operation<BR>executed much more times than the former one.<BR><BR>Can you give me some reference on this topic, or is there<BR>some testing result?<BR><BR>Thanks a lot for your help.

Posting Permissions

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