I must be having a brain fart...
But I'm still not getting it.
Here's my code:
<cfset GetMenuByID = queryNew(fieldnames)>
<cfdump var="#GetMenuByID#">
<cfset temp = QueryAddRow(GetMenuByID,1)>
<cfloop item="field" collection="#form#">
<cfset querySetCell(GetMenuByID,field,form[field],1)>
</cfloop>
And I get this error message:
An error occurred while evaluating the expression:
querySetCell(GetMenuByID,field,form[field],1)
Error near line 72, column 9.
----------------------------------------------------------------------------
----
The column name (FIELDNAMES) that you have specified is invalid. Either this
query does not have a column with that name, or you have specified one of
the reserved column names, e.g., RecordCount
-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 3:55 PM
To: CF-Talk
Subject: RE: Converting Form values to Query
<cfloop item="field" collection="#form#">
<cfset querySetCell(queryFromForm,field,form[field],1)>
</cfloop>
Make sure you do queryAddRow(queryFromForm,1) before the loop.
========================================================================
===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)
Email : [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: Terry Hogan [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 19, 2003 3:52 PM
> To: CF-Talk
> Subject: RE: Converting Form values to Query
>
>
> I have.
>
> So far I have
> <cfset QueryFromForm = queryNew(form.fieldnames)>
>
> But not sure how to get the form field values to populate the
> recordset.
>
> How about a hint to point me in the right direction?
>
> thanks
>
> -----Original Message-----
> From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 19, 2003 3:37 PM
> To: CF-Talk
> Subject: Re: Converting Form values to Query
>
>
> Have a Look at QueryNew(), QuerySetCell(), and QueryAddRow()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4