With a quick glace over the code and if you don't go for Greg's
recommendation, try scoping everything, especially FORM. (But I'd go for
Greg's idea of not using cfupdate :O)

Ade
  -----Original Message-----
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: 13 August 2004 21:12
  To: CF-Newbie
  Subject: Help with Uploading File

  Greetings.

  I'm having problems with an add/delete/update form.
  The first 2 work great, but the third gives me a problem - the replaced
file uploads, but it doesn't get put into the database as the new file name.

  Here's my coding:

  <CFif url.act eq "update">
  (Checks to see if update is required)

  <cfif #form.file_name_new# neq "">
  (Checks to see if the file itself is new or upgraded)

  <cfset "file_name" = "#file_name_new#">
  (If so, it gives the new file name value to the variable file_name)

  <cffile destination
="e:/Inetpub/wwwroot/newshimadzu/ssisales/#prod_group#/"
      action="">       nameconflict="overwrite"
      filefield="file_name_new">
  (uploads the file)

  <cfset "file_name"="#file.clientfile#">
  (Uses the clientfile value as the new file_name value to be uploaded)

  <cfoutput>
  #file_name# and #file.clientfile#
  </cfoutput>
  (Something for my own checking)

  <CFUPDATE datasource="ssimain.mdb" tablename = "items" formfields =
"ID,prod_group,main_category,prod_category,addl_breakout,apps_market,item_na
me,file_date,comments,file_name">

  (SHOULD update variables, including NEW file_name value, but it keeps the
old one)
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to