I had a similar problem,
On the processing page that updated the data base I used the following
Either use a Form or URL variable to pass through the Total Number of Items
in the collection,
<cfloop index='index_no' from="1" To="#URL.Max_Count#">
<cfquery name="updData" datasource="#DSN#">
update MyTable
set Col1='#evaluate("Form.XXX" & index_No)#',
Col2='#evaluate("Form.YYY" & index_No)#',
Col3='#evaluate("Form.ZZZ" & index_No)#'
......
where Col='#evaluate("Form.WWW" & index_No)#'
</cfquery>
</cfloop>
HTH
Jason Lees
National Express
Email : [EMAIL PROTECTED]
-----Original Message-----
From: Jim Mixon [mailto:[EMAIL PROTECTED]]
Sent: 28 February 2001 07:37
To: CF-Talk
Subject: Stumped !
quite frankly I am stumped . . . hopefully I can explain this properly here
... . . and get some needed help . . .
Certain fields in a form are dynamically generated, according to the number
of entries in a table . . .
Each dynamically generated field, i am presuming, needs to have its own
field name(name="uniquename">
so I have each field being created with a "name="sameword#number#" where
the number changes with each new field sequentially by adding 1.
since the submitting form fieldname is not yet known to the processing
page, how can I get that data into the designated table using the INSERT
query . . .?
I can certainly recreate the needed names in the processing page, but that
involves a variable which doesnt seem to work in this case . . .
creating a variable to act as a "form.variable-instead-of-fieldname" just
wont work for me . . .
the idea is that the user form would never need updating because it
supplies fields to the user based on entries in another table . . totally
dynamic . . .
each formfield subsequently needs to create its own record in another table
... .
perhaps this is just not doable using CF and SQL alone?????
Jim Mixon - CEO
APT POINT NET, Inc. "A Premiere InterNET Gateway" . . .
[EMAIL PROTECTED] http://www.apt.net/
PO Box 160217 Hialeah, FL 33016 305-821-8451
FAX (305) 821-8189 auto-switching FAX
powered by Cold Fusion 4.01 . . . . feel the force!
CF Hosting Now Available . . . . !
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists