Access slow to return records

Results 1 to 2 of 2

Thread: Access slow to return records

  1. #1
    Brent Jenny Guest

    Default Access slow to return records

    I am querying an Access database and displying the records in a table. The max records possible in the recordset is about 50 but it takes about 45 seconds to a minute to return the results. I am using ADO if that helps. Can anyone tell me a way to speed up an access connection? My connection is dsnless by the way.

  2. #2
    Join Date
    Dec 1969

    Default RE: Access slow to return records

    Strange that it takes that long. Try adding indexes to your table if you don&#039t have them. You can try this sample of code to see if it speeds up. This query was ran against a Access database and produced the following results:<BR>5 seconds to return 14556 records<BR> <BR> var vDSN;<BR> var vSQL;<BR> var vRS;<BR> var vRCnt=0;<BR> var vField;<BR> var vSDate;<BR> var vDate;<BR> var vMsg;<BR> <BR> vSDate = new Date();<BR> vField = "LABEL";<BR> vDSN = Server.CreateObject("ADODB.Connection");<BR> vSQL = "SELECT * FROM DICTLABL";<BR> vDSN.Open("DSN=Test;UID=Admin;PWD=");<BR> vRS = vDSN.Execute(vSQL);<BR> <BR> while(!vRS.EOF)<BR> {<BR> Response.Write(vRS(vField) + "<BR>");<BR> vRCnt++; <BR> vRS.MoveNext(); <BR> }<BR> vDSN.Close();<BR> <BR> vDate = new Date();<BR> <BR> vMsg = "Started " + vSDate.getHours() + ":" + vSDate.getMinutes() + ":" + vSDate.getSeconds();<BR> vMsg += "<BR>";<BR> vMsg += "Finished " + vDate.getHours() + ":" + vDate.getMinutes() + ":" + vDate.getSeconds();<BR> vMsg += "<BR>";<BR> vMsg += "Records found: " + vRCnt;<BR> Response.Write(vMsg);<BR> Response.Flush<BR><BR>Good luck!

Posting Permissions

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