GetString or GetRows VBScript Class

Anyone know how to do this?

My whole site is like the following when it comes to ADO and vbscript. I move through all of my stored procedure results like this

do until RS.EOF
 response.write rs(0)

What im wondering is: has anyone ever made a vbscript class to speed this up using getstring or getrows?

I.e. say your properties are:


Methods would be:


the idea would be instead of issuing the create recordset object each time, instead instantiate a class. Feed the class the Stored procedure or Tsql query you are trying to retrieve and then using getrows or getstring, read this data into an array.

then using the move next and previous methods be able to walk the result set just like you do in ADO. Only much much faster. Same syntax, just much faster.

anyone tried this before?



Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

i assume that .net do it as the recordset is created  to be transformed in a xml and serialised .after it stay in the server memory and is accessed as an array.
mjreineAuthor Commented:

 I believe you are correct that is how a .net dataset works. Only thing is I need this to enhance the performance of my asp3 app not .net yet. Im working on learning more .net but am not there yet.

Any ideas on how to structure a class like this in vbscript (asp3)?


if your db is on the same server as your webserver ,i don't think that you will run faster as an optimized db engine (of course it's depend about the size of your recordset and it's complexity). if the database is on a remote server youmay create a replication of your query result in a  table in a  local DB.
however if you want to create a class you may create an two dimension object array.
a collumn per field , a row per record. you maintain a row index in your class:
movefirst method means ro_index=0
movenext                      ro_index=ro_index+1
and so on...
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

mjreineAuthor Commented:
Right. Thats I think where im going is to maintain a row index in the class. Just wondering if any of the experts out here have already done this type of class before? i.e. is there code anywhere already for this on the web?


you may maintain your object as a session object and keep the index as a private variable in your class (of course you don't destroy the object after each page processing)
Look at this.

Developing a VBScript Class for an Extremely Lightweight Recordset Alternative:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Oh... you have to register with ASPToday to read that...

Try this link:

mjreineAuthor Commented:
Herman... You nailed it right on the head. That was exactly the article I was looking for. Thanks!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.