Please help -- Using VBScript to query an SQL data

Results 1 to 3 of 3

Thread: Please help -- Using VBScript to query an SQL data

  1. #1
    Join Date
    Dec 1969

    Default Please help -- Using VBScript to query an SQL data

    Hello everyone,<BR><BR>I just got a job as a programmer for an internet auction company. They use a similar format to ****. The head programmer has given me a script that will query the database, and print out all of the item categories. From each category, there may or may not be up to 2 subcategories.<BR><BR>The script prints out all of the categories with their respective sub-categories, in alphabetical order.<BR><BR>The main problem now, is that the script takes about 9 seconds to run before the output is shown. My task is to figure out how to optimize the code to run as fast as possible. Bear in mind, this is my very first exposure to VBScript and ASP.<BR><BR>Thanks in advance,<BR><BR>Justin<BR><BR><BR>I attempted to post the code directly here, but realized this would be a problem with the HTML in the code. <BR><BR>It won&#039t let me put in a link to my script, either, so please go to to view the script.<BR><BR>Thanks a million!<BR><BR>Justin<BR><BR><BR><BR>

  2. #2
    MG Guest

    Default RE: Please help -- Using VBScript to query an SQL

    Some things to research.<BR>First. has a section on ASP speed. <BR>Second. Look at the getrows or getstring method of the recordset.<BR>Third. Be sure to set response.buffer = true at the top of the page and it may be a good idea to flush the buffer every once in a while with response.flush.<BR>Forth. If there is a where statement in the SQL, check the database and make sure that there are indexes for the fields in the where clause.<BR><BR>All of that without even looking at your code.<BR><BR>Now after I looked quickly at the code. Definately loose the do while loop and use getrows. This will speed things up dramatically. Be sure there is an index on Category and try not to use "Like", it is slow.<BR><BR>MG

  3. #3
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Posted a reply in the ASP Performance forum

    look at that once it gets posted

Posting Permissions

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