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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the Value of a field

Status
Not open for further replies.

fiber0pti

ISP
Nov 22, 2000
96
US
I have a database with a Datasheet field. I want this field to read a variable, #File.ClientFile#. But I can't get it to work. Before or during a <CFUPDATE> how do I set the value of a field to a variable?
 

Can we see the code? I'm assuming you're using

<CFSET database.field = &quot;#File.ClientFile#&quot;>

What you're trying to do sounds easy enough but we can't help much unless we can see it. :) Exact error messages help also if there are any.
 
Hey FiberOpti,

The cfupdate tag looks for the existence of form variables that have been submitted by a form. It will take all form variables avaialable and try to insert their values into the table specified into fields that match the form variables. If your form has variables that shouldn't go into the database, use the &quot;formFields&quot; attribute to specify which ones it should use. With CF 4.5, you can now set form fields to a value like this <cfset form.myFile = #File.ClientFile#> so you can modify form variables before a <cfupdate>.

Hope this helps,
GJ

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top