Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
jiecoldfusion #1
how to to check array Null value on coldfusion 7
Hi,
How do you check the array elements empty or not.
for example, I have array[1] - array[10] , and from array[2] to array [10]
has some value, and there is no value in array[1]. How can I check it. Because
before I can check it using
if(array[1] eq "") (in coldfusion 5, it works)
but right now I am using coldfusion 7. It gives me an error about undefined
value. (java exception).
Can you tell me how to check?
Thank you,
jiecoldfusion Guest
-
Check for null query
I have some code something like this in a query of a query: SELECT query1.field1, query1.field2, query1.field3 FROM query1 WHERE field1 not in... -
#25762 [Opn->Bgs]: array_merge returns NULL if one input array isn't set
ID: 25762 Updated by: iliaa@php.net Reported By: flaimo at gmx dot net -Status: Open +Status: Bogus... -
#25762 [NEW]: array_merge returns NULL if one input array isn't set
From: flaimo at gmx dot net Operating system: win xp PHP version: 5CVS-2003-10-06 (dev) PHP Bug Type: Arrays related Bug... -
Question: How check if datareader is null?
"VB Programmer" <growNO-SPAM@go-intech.com> wrote in message news:eGmnp2MYDHA.1784@TK2MSFTNGP09.phx.gbl... If Not (drReader Is Nothing) Then ...... -
Check for Null In Conditional Formating
Try the expression: IsNull() -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users -... -
Karthi #2
Re: how to to check array Null value on coldfusion 7
I don't think you have any way in MX (both 6 & 7) to test for the array element
is empty or not.
<cfset foo = ArrayNew(1)>
<cfset foo[2] = "foo">
<cfif isarray(foo)><cfdump var="#foo#"></cfif>
Use the above code to dump what's in that array. It says "[undefined array
element]" for foo[1]. What I would suggest is initialize all the array elements
with "" i.e. foo[1] = "". Or else use a "try, catch" block as an workaround.
I know it's a nasty way of wrtting code. But what to do, there is no function
like "isEmpty" to verify the null elements. I hope many would have suggested
this to macromedia. I don't know why they haven't taken it up.
Karthi Guest
-
jiecoldfusion #3
Re: how to to check array Null value on coldfusion 7
Thank you so much, try catch works
jiecoldfusion Guest



Reply With Quote

