Re: isDefined Equivalent for an Array

2004-08-04 Thread Runar Petursson
what about using:

test_index lte arraylen(myarray)

- Original Message -
From: Raymond Camden [EMAIL PROTECTED]
Date: Wed, 4 Aug 2004 13:42:39 -0500
Subject: Re: isDefined Equivalent for an Array
To: CF-Talk [EMAIL PROTECTED]

Um, no. The second attribute to isArray checks to see if the variable
 is an array in that particular dimension. There is no built-in way to
 see if an array element is defined. You can , however, use a simple
 UDF. CFLib has one.

On Wed, 4 Aug 2004 14:39:38 -0400, Michael A Vinson
 [EMAIL PROTECTED] wrote:
  IsArray(value, [number])
  -helps to keep that biggole CF poster tacked on the wall :)
  
  -mike
  
  
  Larry Lyons [EMAIL PROTECTED]
  08/04/2004 02:33 PM
  Please respond to cf-talk
  
 To:CF-Talk [EMAIL PROTECTED]
 cc:
 Subject:isDefined Equivalent for an Array
  
  
  Its a long hot afternoon and my brain feels blocked, so pardon the stupid
  question, but is there an equivalent of isDefined for Arrays?
  
  many thanks,
  
  larry
  
 
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: cftry cfcatch/cfcatch/cftry (the solution)

2000-12-13 Thread Runar Petursson

Ok, you wanted a hint, here's big a hint.  Obviously, the advantage to using
a global CFTRY/CFCATCH is that variables are still scoped in the exception
block, unlike the global exception handler.  The open and close cftry (as
you said) must be in the same template, the solutions is surprisingly
simple.  I've implemented the following code in pre 4.5 systems, and it's
worked great:

In the Application.cfm:
cftry
cfinclude template="#cgi.script_name#"
cfabort
cfcatch type="ALL"
cfinclude tempalte="myexceptionhandler.cfm"
/cfcatch
/cftry


This code includes the requested template, so you turn the normal execution
thread a little inside-out.  But it works.  The only thing I've found that
doesn't work with it (since you actually NEVER leave the Application.cfm),
is ColdFusion's built in server-side form handling (where you do HIDDEN
Name="FORMFIELD_REQUIRED").

The nice thing is that it's global and retrofits to any existing code.


-Original Message-
From: Neil H. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 13, 2000 8:38 AM
To: CF-Talk
Subject: cftry cfcatch/cfcatch/cftry


I just found, disappointingly enough that you can't have a cftry at the
top of a document via a CFinclude and the rest in another include at the
bottom?  Is there a work around.  I don't want to use a handler, and I want
the same error checking code on every page.

Please advise or throw ideas (even bones will do)

Thanks,

Neil

p.s. Running CF 4.51.

- Original Message -
From: "Hales, John M" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Wednesday, December 13, 2000 11:17 AM
Subject: RE: CFreport and crystal reports


 I could never get it to work. We just use CF to pass the parameters to
 Crystal, and the CR Web Server to display the reports. That works well for
 us.

 HTH
 Mike Hales

 -Original Message-
 From: Katie Bessiere [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 13, 2000 11:08 AM
 To: CF-Talk
 Subject: CFreport and crystal reports


 has anyone had any luck using CFREPORT with crystal reports 8?  i've tried
 the workaround that Allaire recommends and I still can't get the tag to
 work.  It's very frustrating..

 If anyone has any ideas, please let me know..

 katie

 Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
 Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



help returning record sets from PL/SQL

2000-12-11 Thread Runar Petursson

Can Anyone give me guidance on how to return record sets (ideally multiple)
from PL/SQL using CFSTOREDPROC.

I've got no problem using CFSTOREDPROC, it's the PL/SQL syntax I haven't
found documentation on.

It's real simple in SQL Server, but I haven't been able to do it in Oracle.

Any help is appreciated.

Thanks

Runar


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfscript rules of thumb: loop performance

2000-12-07 Thread Runar Petursson

On a performance note, the loop constructs in CFSCRIPT are considerably
slower (take 5 times longer in some cases) than the CFLOOP counterpart.
This is due to increased flexibility with the cfscript versions.  If you're,
for example, doing a standard for loop, it's usually much faster to use a
CFLOOP with a CFSCRIPT tag within it.

You can test different scenarios by using gettickcount() and doing very
large loops.  Try this code for fun:

cfscript
  time = gettickcount();
  for(i=1; i lt 10; i=i+1)
{
WriteOutput("");
}
time = gettickcount() - time;
writeoutput(time);
/cfscript

cfset time = gettickcount()
cfloop from="1" to="10" index="i"
cfoutput/cfoutput
/cfloop
cfset time = gettickcount() - time
cfoutput: #time#/cfoutput

-Original Message-
From: Eric Fickes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 07, 2000 9:05 AM
To: CF-Talk
Subject: cfscript rules of thumb


Ok, I went ahead and have started using CFSCRIPT and I'm loving it so far.
I was wondering if anybody could give me some CFSCRIPT tips, rule of thumb,
best practice type advice.  I've got alot of old code that I want to go back
and trim up, but I want to make sure that I use CFSCRIPT in the best place,
and take advantage of it.

E
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists