Hello everyone.
Today, when accessing a component directly in the browser, I got the
following cf error:
"Local variable createThingCheck on line 52 must be grouped at the top
of the function body."
It's referring to this placement of this:
var createThingCheck = retrieveThing(theNewUUID);
What is the error trying to tell me?
Here's the code (abbreviated):
<cffunction name="createThing"
access="public"
output="false"
returntype="string"
hint="...">
<cfargument name="thingName" type="string" required="true">
<cfset var theNewThingUUID = 'blahblah'>
<cfquery...>
INSERT INTO Thing (
thingUUID,
thingName
)
VALUES (
'#theNewThingUUID#',
'#arguments.thingName#'
)
</cfquery>
<cfscript>
var createThingCheck = retrieveThing(theNewThingUUID);
if(createThingCheck.recordCount IS 1)
var theReturnString = theNewThingUUID;
else
var theReturnString = "ERROR...blah blah";
</cfscript>
<cfreturn theReturnString>
</cffunction>
Anyone?
Thanks.
DM
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]