Solved

How to use share pooling by ADO and ASP 3.0

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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 demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

776 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