Create a Dynamic, Sortable, Pageable HTML table from a SQL Statement
Author: Devin Garlit
Version Compatibility: ASP
This can be easily made to incorporate images for column heads and for navigation buttons(maybe i'll post that later if this get a good response) Please email me with any questions.
NOTE FROM FREEVBCODE.COM: In our testing, we found a few gotchas with this routine. First, do not include an ORDER BY clause in the SQL statement; always specify the fields to sort by as the 3rd parameter instead. Second, if you are using a JOIN statement where two fields in different tables have the same name, clicking on a column head to sort the table by that field name will fail unless you use an alias for one of them. Overall, however, this is a very useful function with lots of flexibility.
Instructions: Copy the declarations and code below and paste directly into your VB project.