[thelist] ASP question: Request.QueryString(variable) alternative needed.

Anthony Baratta Anthony at Baratta.com
Thu Nov 29 11:53:03 CST 2001


At 09:36 AM 11/29/2001, you wrote:
>On 29 November 2001 at 11:25, April <april at farstrider.org> wrote:
>
> > Annyway.  Here's my problem code snippet:
><snip>
>
>how about using getrows to drop your recordset into a 2d array and then
>looping through that??

My biggest problem with GetRows is the end result is an array. If you need 
to add or subtract fields from the query, you throw off your "counting". I 
much prefer to use the objRS("FieldName") convention. Not only easier to 
read the code, but if you add a new field - you don't kill the rest of the 
code since the new field will be ignored.

My two cents.

<tip type="ASP" author="Anthony Baratta">
When pulling data from a database with ASP, make sure you trim() all your 
data as it comes out of the database.

e.g.

varFieldOne = Trim(objRS("FieldOne"))

You save yourself from debugging hell when the data does not come out 
"clean" from the DB.
</tip>
---
Anthony Baratta
President
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."





More information about the thelist mailing list