ASP 101 - Active Server Pages 101 - Web03
The Place ASP Developers Go!

Please visit our partners


Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash




Script Output:
1136368Saturday 47/4/2009 12:05:41 AM
1136369Saturday 47/4/2009 12:05:42 AM
1136370Saturday 47/4/2009 12:05:42 AM
1136371Friday 37/3/2009 11:02:30 PM
1136372Friday 37/3/2009 11:02:30 PM
1136373Friday 37/3/2009 11:02:30 PM
1136374Friday 37/3/2009 11:13:17 PM
1136375Friday 37/3/2009 11:43:17 PM
1136376Friday 37/3/2009 11:47:06 PM
1136377Saturday 47/4/2009 12:04:37 AM
1136378Saturday 47/4/2009 12:04:50 AM
1136379Saturday 47/4/2009 12:04:52 AM
1136380blah 1237/1/1905
1136381Saturday 47/4/2009 12:19:21 AM

Here's the unformatted version:

1136368	Saturday  	4	7/4/2009 12:05:41 AM
1136369	Saturday  	4	7/4/2009 12:05:42 AM
1136370	Saturday  	4	7/4/2009 12:05:42 AM
1136371	Friday    	3	7/3/2009 11:02:30 PM
1136372	Friday    	3	7/3/2009 11:02:30 PM
1136373	Friday    	3	7/3/2009 11:02:30 PM
1136374	Friday    	3	7/3/2009 11:13:17 PM
1136375	Friday    	3	7/3/2009 11:43:17 PM
1136376	Friday    	3	7/3/2009 11:47:06 PM
1136377	Saturday  	4	7/4/2009 12:04:37 AM
1136378	Saturday  	4	7/4/2009 12:04:50 AM
1136379	Saturday  	4	7/4/2009 12:04:52 AM
1136380	blah      	123	7/1/1905
1136381	Saturday  	4	7/4/2009 12:19:21 AM

ASP HTML Download            FAQ

This sample is part of a pair which illustrate the usage of two of the more efficient database display routines. This set of code utilizes the GetString method. The other one is covered in our GetRows Sample.

Both of these routines get their efficiency primarily from getting you disconnected from the database as quickly as possible. This one does it by creating a copy of the data in a string variable. This saves you having to do any looping at all in your ASP code!

Similar efficiencies can be gained in traditional code by disconnecting your recordsets as early as possible, but very few people ever actually do this. These recordset methods facilitate getting you out of your objects and getting them released ASAP. That being said, the components are also simply more efficient then doing the same thing in VBScript, so they'll even beat a disconnected recordset, but I figured I'd mention it for those situations when GetRows or GetString is just too cumbersome to use. For the rest of the time use one of these... they're just as easy (if not easier) and they'll save your server a lot of unneccesary work.

As always... don't let the length of the code discourage you... it's mostly comments!


Samples

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs