Solved

How to use share pooling by ADO and ASP 3.0

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

760 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

22 Experts available now in Live!

Get 1:1 Help Now