|
 |
asp_web_howto thread: Checking if an array has any elements in it?
Message #1 by "Azinger, Richard" <richard.azinger@p...> on Fri, 6 Dec 2002 16:14:32 -0600
|
|
Hello List,
I declare an array at the beginning of an ASP that will be added to
dynamically. My problem is if nothing gets added.
How do I tell if my array has 0 elements in it. I get an the LBound or
UBound functions.
Here is the lines that throw the errors (I've tried both)
if LBound(arrSessionID) <> UBound(arrSessionID) then
or
if UBound(arrSessionID) = 0 then
the error I get is:
Microsoft VBScript runtime error '800a0009'
Subscript out of range: 'UBound'
/idtest/ss/gb_newReg.asp, line 71
Thanks for any help,
Rich
This communication is for use by the intended recipient and contains
information that may be privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender
by return e-mail and delete this e-mail from your system. Unless
explicitly and conspicuously designated as "E-Contract Intended",
this e-mail does not constitute a contract offer, a contract amendment,
or an acceptance of a contract offer. This e-mail does not constitute
a consent to the use of sender's contact information for direct marketing
purposes or for transfers of data to third parties.
Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean
http://www.DuPont.com/corp/email_disclaimer.html
Message #2 by "Ken Schaefer" <ken@a...> on Sat, 7 Dec 2002 21:49:58 +1100
|
|
isArray()
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Azinger, Richard" <richard.azinger@p...>
Subject: [asp_web_howto] Checking if an array has any elements in it?
: I declare an array at the beginning of an ASP that will be added to
: dynamically. My problem is if nothing gets added.
:
: How do I tell if my array has 0 elements in it. I get an the LBound or
: UBound functions.
:
: Here is the lines that throw the errors (I've tried both)
:
: if LBound(arrSessionID) <> UBound(arrSessionID) then
: or
: if UBound(arrSessionID) = 0 then
:
: the error I get is:
:
: Microsoft VBScript runtime error '800a0009'
:
: Subscript out of range: 'UBound'
:
: /idtest/ss/gb_newReg.asp, line 71
:
: Thanks for any help,
:
: Rich
|
|
 |