Solved

How to use share pooling by ADO and ASP 3.0

Posted on 2004-03-21
4
228 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

930 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now