Solved

How to use share pooling by ADO and ASP 3.0

Posted on 2004-03-21
4
230 Views
Last Modified: 2006-11-17
Hi

Sorry about my enghlish.

I have a website, and i bought domain + host from provider. I see that it run faster when there is 1 people in my website, but it too slow when there are about 2 to many people in my website.

I used ADO connect, and the structure of my web site is:

File index.asp

<!--#Include file="connection.asp"-->
<%      session.CodePage=65001

      createWorkSpace()
      
%>
<html>
          ' my process here
          ........
<%    
           sql = "SELECT top 2 * FROM News order by NewsDate Desc"
           rs.Open sql, objConn, 1, 3
           while not rs.EOF  %>
      ' my process here                                                            
<%      rs.MoveNext
           Wend
           rs.Close%>
          ......
         <% closeWorkSpace() %>
</HTML>

File connection.asp

<%
dim  strVirtualPath, strPhysicalPath, strConnection
dim objConn
dim rs
strVirtualPath = "./db/data.mdb"
strPhysicalPath = Server.MapPath(strVirtualPath)
      
function createWorkSpace()
      strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strPhysicalPath
      Set objConn = server.CreateObject("ADODB.Connection")
      objConn.ConnectionString = strconnection
      objConn.Open
      set rs = Server.CreateObject("ADODB.Recordset")
end function

function closeWorkSpace()
      on error resume next
            rs.Close
            set rs = nothing  
            objConn.close
            set objConn=nothing
      on error goto 0
end function


I hear some people tell about share pooling, but i don't know how to to this with my web site.
Try this website: http://www.temvn.net/index.asp

thanks
0
Comment
Question by:tiephn
4 Comments
 

Expert Comment

by:sushantji
ID: 10646959
To enable connection pooling, go to -

Control Panel > Administrative Tools > Data Sources (ODBC) > Connection Pooling Tab

Double Click on the driver name you are using. Select the 'Pool Connections to this driver' radio button.

-------------------

A web site's performance depends on many factors. The most likely cause for your website being slow is that you are using MS Access as your database. MS Access is a desktop database. It is not recommended for real web sites with multiple users. You may need to change to MySQL, Postgres, SQL Server etc.

Another thing I noticed was that you need to remove SELECT * from your sql queries. SELECT * is much more expensive as compared to SELECT col1, col2 FROM ....  even at the database level.

Using Session variables also affects performance heavily, so Session should be avoided as far as possible.

------------
sushantji
------------
0
 

Author Comment

by:tiephn
ID: 10647122
thanks for your answer

but i saw many web site using MS Access, but they run very fast with multiple users.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12743031
PAQed with no points refunded (of 50)

modulo
Community Support Moderator
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question