Re: Referencing data column by it's name
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Sat, 25 Nov 2006 15:23:26 -0500
Dave Patrick wrote:
It's more efficient to query only the columns you need instead of
using *
Very true.
That syntax will only work in VB/VBA ... not in vbscript which is what the
select fieldname1, fieldname2 from myTable
var_firstname = rs!fieldname1
OP is using.
Actually, given the query you suggested, nothing beats:
var_firstname = rs(0)
If you're trying to make your code more "readable", use constants:
const FirstName = 0
.....
var_firstname = rs(FirstName)
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- References:
- Referencing data column by it's name
- From: nospam
- Re: Referencing data column by it's name
- From: Dave Patrick
- Referencing data column by it's name
- Prev by Date: Re: Referencing data column by it's name
- Next by Date: Re: Using a variable as the data source
- Previous by thread: Re: Referencing data column by it's name
- Next by thread: Re: Referencing data column by it's name
- Index(es):
Relevant Pages
|
|