Classic ASP: More Efficient Database Recordset, GetRows() XoiseRecordset

I’ve created what I believe to be a more efficient recordset object for traversing rows returned from a database query. I implemented all methods/properties that I feel make sense to implement. There’s definite room for improvement, but it’s a good start. My reasoning for creating this is that I like the functionality of using recordsets (via Server.CreateObject("ADODB.Recordset")), but there is a HUGE drawback in that it is horrible on the database. The Server.CreateObject approach makes a database call every time a EOF, BOF, or a traversal method (ie. MoveNext, MovePrevious, etc.) is called.

My fix is to use the GetRows() method to return it as a multidimensional array and just implement my own class with the same (or similar) functionality. There is also an advantage to using this Recordset over just plain using the GetRows() method. I went ahead and implemented a way to extract the column names from the query, which allows you to grab the information using the column name, instead of the index of the array (ie. objRS("Column_Name")). You may also access the data using the column index if you prefer. Note that I haven’t implemented support for "SELECT * FROM Tbl…" syntax, so you’ll HAVE to use the index for this.

There is one main usage difference to note. Rather than opening the recordset with .Open SQL_String, Connection_Object, you must individually update the .Conn and .SQL properties. I’ll most likely change this if there is enough interest and I create a newer version. If I do that, I’ll most likely provide cache support.

Download: (1.29KB)


Retrieve Data:

  • objRS("Column_Name")
  • objRS.Item("ColumnName")
  • objRS.Row(0)

Implemented Methods/Properties:

  • Conn
  • SQL
  • EOF()
  • BOF()
  • MoveNext()
  • MoveFirst()
  • MoveFirst()
  • MoveLast()
  • Move()
  • GetRows()
  • RecordCount()
  • PageCount()
  • PageSize()
  • AbsolutePage()
  • AbsolutePosition()

How To: Create a Simple Visual “Loading” Effect

If you've got a script that takes a while to load and want to make your user aware that everything is alright, then this tool is for you. The idea is simple – display the message before the labor intensive part of the script runs, and then using CSS after the labor intensive part of the script, hide the message. If you're using a language that provides a buffer (ASP for instance), make sure you turn the buffer off first, or this won't have any effect. (eg. Response.Buffer = False) Example (See it in action):

ini_set('implicit_flush', 'on');

echo '<p id="loading_msg"><img src="" alt="" style="vertical-align: middle;" /> Loading...</p>';

// Code that takes forever here, could of course be any language
sleep(5); // Only for demonstration

echo '<script type="text/javascript">
window.onload = init;

function init() {
	document.getElementById("loading_msg").style.display = "none";
echo '<p>Woohoo, five seconds passed.</p>';


How to connect your laptop to the internet through your Motorola Razr

I wouldn’t say this is a web tool, but it could certainly come in handy for those who want to use web tools anywhere they can get a cell phone connection!

By now, I’m sure most people are aware that you can connect your laptop to the internet through your cell phone. However, if you’re like I was a couple of hours ago, you don’t know how. It’s really not too bad to do, unless you run into problems.

What you need:

  • Cell Phone
  • USB Cable (you can use bluetooth as well)
  • Not required, but nearly essential: Unlimited data plan (otherwise you’ll rack up HUGE charges)

Here’s a step-by-step for what I did:

  1. Disable EVDO on your phone. Basically, your phone constantly checks two different types of connections, and you’re disabling one of them.  By doing this, you shouldn’t see any difference in your phone’s connection, but you will be able to use your phone as a modem and you will actually get better battery life on your phone.  To disable EVDO, use this guide.
  2. Make sure your Phone is in “Modem/COM” mode. From the main menu, go to Settings -> Connection -> USB Settings. Make sure Default: is set to “Modem/COM.”
  3. Connect your cell phone to your laptop with the USB cable. Your computer should automatically recognize it and install the proper drivers. (Note: Make sure that whenever you do this, you plug it in the same USB port [otherwise it will want to install drivers for each port].)
  4. Open the Device Manager from the Control Panel. Under “Modems,” make sure that you see your phone there (it’ll say something with Motorola in it). If it’s not there, you’re missing some driver. Check out the guides and downloads at HackTheRazr.
  5. If you see your phone under “Modems,” you’re almost there! Follow the following steps to create a new network connection through your phone:
    • Create a new network connection (from the menu in the Network and Sharing Center in Vista or somewhere in the control panel in XP)
    • Choose “Set up a dial-up connection.”
    • For the dial-up phone number, put in #777. Leave the username & password blank. Give your connection name a name of whatever you want. Click connect.
    • BAM. You should be able to use the internet now.

Website Monitoring Service

I use Site24x7 for my website monitoring service – it’s nice because you can be notified via email and/or SMS whenever your site goes down. Sorry, it’s not free – I only use it because I signed up when they started and was grandfathered in. The website I’ve been working on has recently been having a lot of problems and I wanted to keep close tabs on it. This runs into a problem because Site24x7 only allows a maximum of 5 minute intervals for site requests.

A quick search on Google found HostTracker. It’s a handy web tool which does every Site24x7 can do (as far as I can tell). Better than that though, the 30 day trial allows up to 1 minute site request intervals…bingo! Very handy. The site is very easy to use and very helpful. I’d definitely recommend giving it a try.

The Gratitude Campaign

This is obviously an aside to the web tools I usually post about.

As the son of a 20+ year, 3 time war Army vet and brother of a ROTC cadet, I feel the need to help spread the word about a new effort to show our gratitude for our brave armed forces.

From an email I received:

Have you ever seen one of our military walking past you and wanted to convey
to them your thanks, but weren’t sure how or it felt awkward?

Recently, a gentleman from Seattle created a gesture which could be used and
has started a massive movement to get the word out.

Please everybody take just a moment to watch…. The Gratitude Campaign
…and then forward it to your friends!

Click on below.

Valid Google PageRank for each server

DigPageRank LogoI just thought I’d share the site wholesale jerseys that I use to find my sites’ PR. I cheap nba jerseys use DigPageRank. The site wholesale mlb jerseys is a very useful tool. The Obviously, there are a wholesale jerseys lot of PR tools etc. out Generator there, but I find this Through one particularly Thanh useful because it’s simple and Freelance it returns results from multiple servers, which can be useful in verifying it’s validity – which is also another cheap nba jerseys nice feature that the site boasts.


Hash Generator – MD5, MD4, SHA-1, SHA-256, SHA-384, SHA-512, and more

I’ve created Building a wholesale jerseys script that will hash Book a cheap mlb jerseys given string with 38 different algorithms. The algorithms are listed wholesale jerseys below.


HTML Form:

Key to hash:

PHP Source Code:

if (isset($_POST['key'])) {
	$key =  cheap jerseys  $_POST['key'];
	echo  tools,  '
    '; foreach (hash_algos() as You $algo) { echo '
  • ', $algo, ':
  • '; card” } echo '
'; } (24.11.2014) else { echo '

This will generate hash codes for the following algorithms: ', implode(', wholesale nba jerseys ', hash_algos()), '

'; } ?>

Included hash types:

  • md2
  • md4
  • md5
  • sha1
  • sha256
  • sha384
  • sha512
  • ripemd128
  • ripemd160
  • ripemd256
  • ripemd320
  • whirlpool
  • tiger128,3
  • tiger160,3
  • tiger192,3
  • tiger128,4
  • tiger160,4
  • tiger192,4
  • snefru
  • gost
  • adler32
  • crc32
  • crc32b
  • haval128,3
  • haval160,3
  • haval192,3
  • haval224,3
  • haval256,3
  • haval128,4
  • haval160,4
  • haval192,4
  • haval224,4
  • haval256,4
  • haval128,5
  • haval160,5
  • haval192,5
  • haval224,5
  • haval256,5

Useful SEO tools, etc.

Estibot LogoI consider myself somewhat of a domainer, so I’m always trying to keep a good overall look over the industry so I know what’s going to happen before others card” do. Rich When I find domains or sites I might be interested in, I typically do some quick research on them. I also wholesale jerseys like to keep a good handle on the statistics for my sites and how their keywords are operating.

The following is a list of random web tools I use nearly on a day-to-day basis in no particular order.

  • Estibot
    • This is a nice tool for evaluating the potential value of a domain. It uses several techniques including keyword value and frequency, domain length, TLD (top-level-domain) value, domain registration length, Google PageRank, etc. to produce a se handy (generally somewhat realistic) domain valuation. Keep in mind that a domain or site is always worth what someone is willing to pay for it, so make sure you wholesale MLB jerseys do far more research than just this.
  • DNScoop
    • This tool is very similar to estibot, except that it uses a slightly different algorithm to determine the valuation and has a slightly wholesale jerseys nicer interface, though Estibot is faster.
  • Nameboy
    • Again, this tool is similar to the other two. I would use it more, but it delivers the results via email which sometimes can take a while and be a pain. Oh well, it’s still free!
  • Dope Domains
    • This site has a very simple idea to it. It automatically spiders sites like TDNAM (GoDaddy’s domain after-market) and Sedo for the latest and greatest expiring domains. The filters are nice so that you are able to spot out domains you’re interested in by TLD and/or categories like domains with traffic, short domains, dictionary domains, etc.
  • DigitalPoint Forums
    • This site is a very large, active community with a small proportion of helpful people. They will give you their insight on the good, the bad, and the ugly of your domains and sites (sometimes whether you want it or not). It’s also a good place to buy and sell domains, sites, and services.
  • NamePros Forums
    • This site is very similar to No. DP (DigitalPoint). I have lost interest in it because it seems to be less active and people seem less helpful.

Freelance “time card” calculator

I don’t know how many others will find this handy, but I’ve found it handy myself. It’s tools like this that make this site “Random Web Tools.” 🙂

The script is very simple. I just basically created a format for logging the time you work in a text file, so that you can copy and paste in your “time card” and it will spit out your total time worked. The script could easily be modified to your liking. I threw up an example here. I originally wrote the script and also ported it to PHP.

Enter the times in the following format, separated by new lines or whatever. Whitespace does not matter. The number in the parenthesis is what counts. That’s the total hours:minutes worked during that period of work. The script could be improved by just counting up from the times themselves, but there are lots of problems that could run into unless you included dates, and for personal reasons, I chose not to do that. Don’t forget to change the hourly_rate variable if you want it to tell you how much you get owed.

1:27 PM - 2:08 PM		(0:41)
12:09 AM - 1:12  ENCIERROS  AM		(1:03)


HTML form:

Enter the times, separated by new lines or whatever. Whitespace does not matter.

PHP source code:

 0) {
		$pos2 = strpos($str, ')');
		$arr[$x] = substr($str, $pos + 1, $pos2 - $pos - 1);
		$str = substr($str, $pos2 + 2, strlen($str));
		$pos = strpos($str, '(');
	$hours = 0;
	$minutes = 0;

	for ($x = 0; $x = 60) {
			$hours = $hours + 1;
			$minutes  ПЕРЕДЕРЖКА  -= 60;
		$hours +=  Windows  $arr2[0];

	$total = $hours * 15 + $minutes / 60 * 15;

	echo "

Worked $hours hours and $minutes minutes (" . number_format($hours + $minutes / 60, 2, '.', '') . ")
That's $" . cheap nba jerseys number_format(($hours + $minutes / 60) * $hourly_rate, 2, '.', '') . "

"; } ?>

ASP source code:

		ReDim Preserve arr(x)
		pos2 = InStr(str, ")")
		arr(x) = Mid(str,  cheap jerseys  pos + 1, pos2 - pos - 1)
		str = Mid(str, pos2 + 2, Len(str))
		pos = InStr(str, "(")
		x = x + 1
	hours = 0
	minutes = 0

	For x = 0 To UBound(arr)
		arr2 = Split(arr(x), ":")

		minutes = minutes + CInt(arr2(1))

		If minutes >= 60 Then
			hours = hours + 1
			minutes = minutes - 60
		End If

		hours = hours + CInt(arr2(0))

	total = hours * 15 + minutes / 60 * 15


Worked " & hours & " hours and " & minutes & " minutes (" & FormatNumber(hours + cheap jerseys minutes / 60, 2) & ")
That's " & FormatCurrency((hours + minutes / 60), 2) & "

") End If %>