Hi Everyone
Hoping someone can help me with this one - what is the best format for
updating several rows in a database simoultaneously with values put into a
web form?
I have a web form setup that lists the records of a database with one of the
fields (a text field) being updateable. I want to be able to add content to
the text field for each record and then to update it in the database in one
hit.
I have tried using a cfloop but it doesn't update the correct record/s. I am
using Access.
Here is a sample of the code for the form action page:
<cfquery name="Tasks" datasource="Hum" dbtype="ODBC">
SELECT ID, Coordinator
FROM Humtest
</cfquery>
<cfloop query="Tasks">
<cfquery name="InsertCoord" datasource="Hum" dbtype="ODBC">
INSERT INTO Humtest (Coordinator)
VALUES ('#Form.Coordinator#')
</cfquery>
</cfloop>
I have tried putting in a WHERE statement but can't make it work, and I am
not even sure that the above code is the best format to use. I have a hidden
form field to capture the ID (the primary key) info on the form itself.
There is probably a very easy solution for this - but it has been one of
those days already!
Thanks a million, in advance, for any advice
Cheers
Marika
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/