OK - before I tried turning this particular problem into a service, I
had a simple query like this, which works (examples simplified for
clarity, whatever that is!):
<cfloop from="1" to="#form.totalPERSONS#" index="idx">
<cfquery name="WRITE_ENROLL">
INSERT INTO participants (
enrID,
part_class )
VALUES (
#evaluate("form.enrID#idx#")#,
'#evaluate("form.part_class#idx#")#' )
</cfquery>
</cfloop>
The function to handle this once converted is failing with 'Can't
generate stub....blan, blah.... so I've got a syntax problem or just
simply don't know what I'm doing trying to translate the above.
Here's what I've got:
To invoke the beast:
<cfinvoke webservice="myWEBSERVICE"
method="ENROLLMENTS"
WStotalPERSONS="#form.totalPERSONS#"
<cfloop from="1" to="#form.totalPERSONS#" index="idx">
WSenrID#idx#="#evaluate("form.enrID#idx#")#"
WSpart_class#idx#="#evaluate("form.part_class#idx#")#"
</cfloop>
>
And here's the function:
<cffunction name="ENROLLMENT_TWO"
access="remote"
returntype="query" >
<cfargument name="WStotalPERSONS" type="numeric" />
<cfloop from="1" to="#arguments.WStotalPERSONS#" index="idx">
<cfargument name="WSenrID#idx#" type="string" />
<cfargument name="WSpart_class#idx#" type="string" />
</cfloop>
<cfloop from="1" to="#WStotalPERSONS#" index="idx">
<cfquery name="WRITE_ENROLL">
INSERT INTO participants (
enrID,
part_class )
VALUES (
WSenrID#idx#,
'WSpart_class#idx#")#' )
</cfquery>
</cfloop>
I probably need to rethink the way this particular function has to work,
but I desperately need some pointers please!
Thanks,
Les
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264101
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4