In Part I of this series, we saw how to create a VBScript class to query our database using the very fast GetRows() method, and return a recordset as a local array. In Part II, we extended the class to allow ADDing and UPDATEing a row in the database. In this Part III, we will expand the class further to allow pagination of the returned recordset.
Expanding on a previous article, we will see how to add 2 new methods to our class: one that inserts a new record in our table and another that edits an existing one. Use them against any table with just a few lines of code.
The GetRows method of the ADO object is known to be the fastest way to fetch a recordset. By encapsulating the logic within a VBScript class, it’s possible to query your database and return your records to a local array in only 3 lines of code.