Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFUPDATE Problems

Status
Not open for further replies.

lsd4mE

MIS
Jul 27, 2006
12
US
have built a flash form that pulls information dynamically from a mysql db. everything but the edit feature is working. When the form is submitted, it is sent to submit.cfm. For some reason, errors appear as:

The given fieldname "DBDATA.FIRSTNAME" could not be found in the table "table".

Below is a STRIPPED down version of what we have. Is there something im doing wrong?

--SUBMIT.CFM--

<cfupdate dataSource = "datasource"
tableName = "table"
formFields = "firstname,lastname">

----------------------------------------

--FORM.CFM--


<cfquery name="dbdata" datasource="datasource">
SELECT * FROM table
</cfquery>

<cfform format="flash" action="submit.cfm">

<cfformgroup type="vbox"><cfformgroup type="panel" label="Information">

<cfgrid name="dbdata" query="dbdata" rowheaders="false">
<cfgridcolumn name="firstname" header="First Name" />
<cfgridcolumn name="lastname" header="Last Name" />

</cfgrid>
</cfformgroup>

<cfformgroup type="panel" label="Edit">
<cfinput type="text" name="firstname" label="First Name:"bind="{dbdata.selectedItem.firstname}" />
<cfinput type="text" name="lastname" label="Last Name:"bind="{dbdata.selectedItem.lastname}" />

<cfinput type="submit" name="submit" value="Apply changes" />
</cfformgroup>

</cfformgroup>
</cfform>
 
Is there something im doing wrong?
Yep, you're using cfupdate. Try writing the update query and you'll most likely solve this problem in the process.

Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top