I guess I sorta see it as fixing an inconsistency.  

If you run a query like this in CF 5:
<cfquery name="getname" datasource="#database#">

Select name

from table

where 0=1

</cfquery>

(This query will not return a record set)

And then try outputting the value of name:

<cfoutput>#getname.name#</cfoutput>

You do not get an error.

But if you tried to output :

<cfoutput>#getname.name[1]#</cfoutput>

You would get an error in CF 5.

Now in CFMX they both work the same.

But, yes this should be documented.



Mark W. Breneman
-Cold Fusion Developer
-Network Administrator
  Vivid Media
  [EMAIL PROTECTED]
  www.vividmedia.com
  608.270.9770

-----Original Message-----
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 11:40 AM
To: CF-Talk
Subject: Re: Query-past protection?

If its a feature rather than an oversight then it should be clearly
notes. I
expected an error and when I didn't get it, I was concerned. Don't get
me
wrong, it's nice but it worries me when an expected error based on code
logic does not exist.
If it is a feature, I wonder how many other 'anti-error' features have
been
included.

> Michael,
>
>
>
> I think this is an "improvement" in CFMX.  I know in CF 5 if you try
to
> access a query element that does not exist, you would get an error.
> But, in CFMX it seems to gracefully handle this.
>
>
>
> Can anyone confirm this?
>
>
>
> MB
>
>
>
> Mark W. Breneman
> -Cold Fusion Developer
> -Network Administrator
>   Vivid Media
>   [EMAIL PROTECTED]
>   www.vividmedia.com
>   608.270.9770
>
> -----Original Message-----
> From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 27, 2003 11:13 AM
> To: CF-Talk
> Subject: Query-past protection?
>
>
>
> OK, here's a strange one that I need others to test out. Run a query,
> then
> try to access an element past the amount in the query.
> <CFQUERY name="queryname">
> select top 1 columnname from table
> </CFQUERY>
> <CFOUTPUT>#queryname.columnname[1000]#</CFOUTPUT>
> What should happen is an error message saying your trying to access a
> query
> element outside the range of the query results. What I'm getting is a
> blank
> value. If others get the same thing then it's an interesting 'feature'
> that
> should be noted, despite it being technically wrong.
>
>
>
>   _____
>
>
>

  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to