Editing a record and adding cffile, please help

Hello;
I write a page of the Publisher of a web site. I am trying to add cffile to the edit function. This page is used in 2 ways to edit the records in DB, it can add a new, and it can modify an existing one, one.

What I try to do is the following:

1. When you add a record, you can upload an image and add all of the content in the other fields, click the ok button and it will download the file and add the name of the file in the DB table.

2. When you want to change the record, the download file is empty and is the name of the file being used, you can download a new file and change the one that is using file.

Here is my code so far, I did not number 2. Yet, I don't know how to do it and the same goes for download the file in the action script and which in fact add to the record of the DB.

Change the code in the page:

< cfset FormFieldList 'image, description, title, body' = >

< cfif ParameterExists (URL. RecordID) >
< cfquery name = "featRec" dataSource = 'creative' LignesMax = 1 >
SELECT feature.title, feature.image, feature.discription, feature.body, feature.ID AS ID_Field
FUNCTION
< cfif ParameterExists (URL. RecordID) >
WHERE feature.ID = #URL. RecordID #.
< / cfif >
< / cfquery >

< cfif not ListFind (FormFieldList, 'ID') >
< cfset FormFieldList = ListAppend (FormFieldList, 'ID') >
< / cfif >


< cfset title_Value = ' #featRec.title # ' >

< cfset image_Value = ' #featRec.image # ' >

< cfset discription_Value = ' #featRec.discription # ' >

< cfset body_Value = ' #featRec.body # ' >


< cfelse >


< cfset title_Value = ">

< cfset image_Value = ">

< cfset discription_Value = ">

< cfset body_Value = ">


< / cfif >
< head >
< / head >
< body >
< cfoutput query = "featRec" >
< do action = "Action.cfm" method = "post" name = "content" id = "content" onsubmit ="saveIt ()" > "
< input type = "hidden" name = "FieldList" value = "#FormFieldList #" >
< cfif ParameterExists (URL. RecordID) >
< input type = "hidden" name = "RecordID" value = "#URL. RecordID #">"
< input type = "hidden" name = 'ID' value = '#URL. RecordID #">"
< / cfif >
< input type = "text" name = "title" class = "textInputs" value = "' #title_Value # ' maxLength '510' = >"
<!--this is the uploader of file-->
< input type = "file" name = "MYFile" >
< cfif MYFile IS defined >
#file #.
< / cfif >
<! - end code of the file uploader - >
< input type = "text" name = "image" class = "textInputs" value = "' #image_Value # ' maxLength '510' = >"
< input type = "text" name = "description" class = "textInputs" value = "' #discription_Value # ' maxLength '510' = >"
"< textarea cols =" "lines =" "name ="PDSeditor"style =" display: none "> #Body_Value # < / textarea >
< / cfoutput >
"< input type = 'submit' class ="formButtons"name ="feat_OK"value =" OK ">".
< input type = 'submit' class = "formButtons" name = "feat_Cancel" value = "Cancel" >
< / make >


Action Script:

"" < cffile Action = "upload" filefield = "uploadfile" = destination ' http://www.myurl.com/img/feature ' nameconflict = "MAKEUNIQUE" >
< ParameterExists (Form.RecordID) cfif >
< cfupdate dataSource = "" #sitedatasource # "tableName ="feature"formFields =" #Form.FieldList # ">"
< cflocation url = "feature_RecordView.cfm >"

< cfelse >
"< cfquery datasource =" "#sitedatasource #" dbtype = "ODBC" username = "#siteUserID #" password = "#sitePassword #" >
INSERT INTO characteristic (image, description, title, body)
VALUES (' #form.title # "," #form.image # "," #form.description # ', ' #form.) PDSeditor #')
< / cfquery >
< cflocation url = "feature_RecordView.cfm >"
< / cfif >

<!--> end of the code

Can someone help me? I am confused on how to make this work.

Thank you.

Phoenix

Hello;
I write a page of the Publisher of a web site. I am trying to add cffile to the edit function. This page is used in 2 ways to edit the records in DB, it can add a new, and it can modify an existing one, one.

What I try to do is the following:

1. When you add a record, you can upload an image and add all of the content in the other fields, click the ok button and it will download the file and add the name of the file in the DB table.

2. When you want to change the record, the download file is empty and is the name of the file being used, you can download a new file and change the one that is using file.

Here is my code so far, I did not number 2. Yet, I don't know how to do it and the same goes for download the file in the action script and which in fact add to the record of the DB.

Change the code in the page:



SELECT feature.title, feature.image, feature.discription, feature.body, feature.ID AS ID_Field
FUNCTION

WHERE feature.ID = #URL. RecordID #.


















#file #.








Action Script:

http://www.MyURL.com/IMG/feature' nameconflict = "MAKEUNIQUE" >




INSERT INTO characteristic (image, description, title, body)
VALUES (' #form.title # "," #form.image # "," #form.description # ', ' #form.) PDSeditor #')

Can anyone help me? I am confused on how to make this work.

Thank you.

Phoenix

url=" "="">

Tags: ColdFusion

Similar Questions

  • I have a Dell Inspiron with windows XP and I can not start. I have the windows disc but do not know how to clean and reinstall. Please help me

    I have a Dell Inspiron with windows XP and I can not start.  I have the windows disc but do not know how to clean and reinstall.   Please help me

    You can repair XP or try the following:
    http://support.Microsoft.com/kb/917964
    http://support.Microsoft.com/kb/307545

    TO

    Re - install http://support.microsoft.com/kb/978788

  • I don't have the basic games that windows comes with and also miss me the contacts and calendar. Please help someone. I had windows 7 through my school, which is outside the MSDN program.

    I don't have the basic games that windows comes with and also miss me the contacts and calendar.  Please help someone.  I had windows 7 through my school, which is outside the MSDN program.

    Programs like Contacts and calendar are available in Windows Live Mail through Windows Live Essentials (http://download.live.com)

    In regards to the games, I assume that you are running Windows 7 Professional.

    Click Start, type: features on or off Windows activate
    Develop games
    Select the games you want. Andre Da Costa http://adacosta.spaces.live.com http://www.activewin.com

  • I get the error code message please connect firewall and protection antivirus please help

    I get the error code message please connect to the internet to validate your serial number, but I'm connected to the internet, I have disabled firewall and virus protection please help

    Please read https://forums.adobe.com/thread/1499014

    -try some steps such as changing browsers and disable your firewall

    -also clear the cache of your browser if you start with a fresh browser

    -check the file hosts for blocked entries https://forums.adobe.com/thread/1912777

    http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip.

    https://helpx.Adobe.com/creative-cloud/KB/creative-cloud-desktop-application-failed.html

    http://helpx.Adobe.com/creative-cloud/KB/failed-install-creative-cloud-desktop.html

  • I can't import any type of video file in the sequence, it represents imports video and audio. Please help me I am unable to work and I have clients waiting!

    I can't import any type of video file in the sequence, it represents imports video and audio. Please help me I am unable to work and I have clients waiting!

    Wild guess: I forgot to patch source the video track.

  • Stop action does not (and other errors) Please help!

    Hi all

    This is my first attempt at an interactive chart with flash professional.

    Work on a Mac (OS 10.8.5), Flash Proefessional CC.

    I created 6 frames, and I'm ready to start the animation. I want users to be able to click on one of the 5 buttons on the first image, this will lead to a corresponding frame that contains a bunch of buttons that link to external sites. Each of these images, there is also a button that links users to the first image.

    This should be very simple.

    The problem comes from the GET very go, I can't even control stop working [stop();] so when I test (Enter cmd), he just continually travels 6 images.

    I saw a forum where someone said that if there is a flash error will just ignore the script and scroll through the images. It seems really weird to me that Flash would just ignore if there is only one error in the script. Is this really the case?

    I had a few mistakes, but looking around on other forums I didn't understand what they meant.

    Here's what came:

    Supported text is limited. It is generally recommended to include the text as HTML (see DOMElement) elements. (125)

    Radial gradient (not oval) circulars are supported only.

    In EaselJS frame numbers start at 0 instead of 1. For example, this STOP button and gotoAndPlay calls. (3)

    Happy with the two Bitmaps and buttons can generate errors of local security in some browsers to run from the local file system.

    So I won't be able to do anything whatsoever as long as one of these erros occur? If this is the case, other than Googling through a bunch of forums that may or may not explain things in language I can understand, does Adobe offer a resource to help users resolve specific errors? Another that the gradient, I have no idea what one of these facilities, and the search thorugh the forums did not help.

    What I'm trying to do should be very simple, but it gives me a lot of trouble. I went through a lot of Lynda tutorials, tutorials from Youtube and even Adobe Tutorials and I thought I was ready to start add actions, but obviously I'm missing something fundamental. Please help me!

    See you soon!

    Patrick

    I made an animation from scratch and everything has been published on very well until I added an audio file with a very long name - then I got the white screen. I removed, shortened, reimported it and viola... I had images- and his! Yay.  (I downloaded your file. Just shorten the library names did not do the trick.)

  • Problems with WRT160N and Xbox 360 - please help

    Hello

    I recently bought a WRT160N router and when I play games online (Halo 3 or Modern Warfare 2) it takes about 10 minutes to find a game then that in the Hall. I didn't put in the door or disconnected from my profile, there's just a lot of time. It says that my NAT type is open. I've isolated the problem is the router because if I plug in an ethernet cable from the 360 to the DSL modem I find games instantly. I examined the port forwarding and open ports on the 360 and specifically for modern warfare 2 and it was actually my NAT type go as strict, ironic. I have spent 5 hours trying to mess with this and can't seem to make it work right. If someone could please help me on the settings or have any other ideas that would be greatly appreciated.

    As your ISP is a provider DSL, most providers DSL has setup their modem in DHCP Mode, so your Modem acts like a router. So, right now, your Setup is NAT behind NAT. So if you try to open the Ports on your Linksys router it does not work as your Modem Hangs only ports.

    So the best way to work is to convert your Modem in Bridge Mode and it will solve all your problems.

  • Installing FLEX and CF debugger - Please HELP

    I can't line for CF debugger in eclipse to work for the life of me. I tried this for more than 8 hours. I follow the directions on all the tutorials out there on the web and still no luck. All my CF admin settings are correct. I think it has to do with the mappings of debugging, but not sure. I have a remote server in CF and am under Flex Builder 3 out of my local mobile (so wouldn't that mean that the server and Eclipse are not on the same machine?) My web root is a drive mapped to the remote CF machine (z:\websites) network. I can connect to the CF RDS very well... I can use the assistants very well... I can set breakpoints on the CFC page fine... but the right debugger will not show me all variables. Please help me understand what I am doing wrong.

    For anyone having set up the debugger, please follow these steps (btw all the tutorials there are terrible and leave aside important steps so I thought I have documents to help others). Being a developer of software applications and not an admin network these remote paths may be difficult to understand.

    1. uninstall any Flash player or the plugins you have

    2. run and install the Flash player and a debugger that comes with Flex Builder (located in the folder of installation of Flex, mine was under C:\Program Files\Adobe\Flex Builder 3\Player\win). You will see 3 files, but only need to install Flash Player Active X and Plugin

    3. make sure You ' r debugger and tester work (CF line debugging is enabled). In Windows under Adobe--> RDS preferences click the buttons on 2 test.

    4. install CFEclipse (to be able to get the code hints Eclipse color code cfm and cfc like DreamWeaver only)

    5 make sure you have 2 breakpoints in the section that you want the debugger to stop. I used 1 and a vacuum of space and was not stopping on breakpoints. Also make sure the breakpoints are on a command-line to coldfusion.

    6. If you use localhost adds nothing to the other maps section that http://localhost: (your port number, if you are running CF admin you will see the port number in the URL). If you have a CF server remotely even if it's the HARD part. It took me days to understand my mappings. I'll just give my setup you and work with to understand your own.

    I have my server remote drive mapped to Z:\ and my WWWroot is z:\websites so the correct path of Eclipse = z:\websites.
    The correct path to Coldfusion's /websites (don't ask me why or how, but anything other that that did not work)

    7 run the debugger by clicking on the right arrow next to the icon of debugging, select other, then CF (launch a new configuration is that you have not already). When you put in place and press 'Debug '... Press F11 to start a browsing session. Go to the page that you set breakpoints for and the debugger should work!

    I hope this helps and saves others the agony of playing with mappings.

  • Black screen of death - NETIO. SYS and ntoskrnl.exe please help

    (I don't know if this is the right topic)

    Hello community,

    So I bought a new game PC 3 days and I have problems with BSOD I get + 3 times per day and I have no idea systems and things.

    Tell me everything you know aslong it's fixable.

    I checked BlueScreenView and those are addresses in stock:

    NETIO. SYS + 39d3e network subsystem i/o

    Ntoskrnl.exe + 75169 & NT Kernel System

    I have no idea on minidumps, nor how to open them and these things, please explain the problem to him and ask me what to know first.

    Thank you.

    FRozXY

    I would contact the two just to be sure but I think I understand the ram should be replaced and replacement ram shouldn't cancel you guarantee

  • Following flash button and ButtonBack component please help

    Hi all

    I have been setting up a video with cue points for Navigation, thinking that the next button and ButtonBack would actually moved forward and back, based on benchmarks of navigation. Well, they don't do anything, it seems. Can someone explain what the function of the ForwardButton and BackButtons are? How can I use them?

    I would like to set up a video simply have a next and previous button (they must say previous and not only buttons that look like to a he). Any thoughts? All the world done that in the past?

    The vast majority of the use of these buttons must do exactly that, go forward or backward, a little bit of time. As it fast forward and rewind. You have a desire to specialty, 99.9% of the use of built-in controls is never used to. You want to get benchmarks. If you need to customize what happens when you press these buttons for your particular needs.

    To my knowledge, none of the predefined components will do what you want and I'm quite familiar with all of them. I tend to make my own good.

    The code above is not intended to give you all the code you need to do what you want. It is not my code, I just copy and paste the code from this link and added a few comments. You must read the information on this page. This is a tutorial on this exact code. I just posted the code so that you know where to start reading to achieve your goal.

  • Windows xp pro sp3 will not start corrupted boot.ini and hal.dll - please help

    I installed Norton 360 offred via internet was last updated.  It immediately launched all applications previously disabled at STARTUP in msconfig.  And shortly after he started to gives me the blue screen "to the death".  This done in two days, and I was desperately trying to solve the problem by turning off almost all applications critical to running Windows XP Pro SP3, Norton and Office 2007 Home and student.  I even went and tried to edit the Boot.ini file in startup and recovery under the Advanced tab in the workstation properties.  Now all I get is an error message Windows cannot start because the hal.dll file is missing or damaged.  I replaced it by copying a modified version of the boot sequence, while the hard drive of my laptop was enslaved to my desktp PC, but nothing helped.  I can't even the Recovery Console to start on my laptop.  I need HELP, please.

    These profile errors are usually caused by one of the following:

    1-profile corruption.  The user profile is damaged and that Windows cannot load.  To resolve this issue, create a new user profile and move your files to the new profile.   See here for more information:

    How to copy data from a corrupted to a new profile in Windows XP user profile

    2 drives or corruption of the file system.  Run chkdks /f on the volume C:.  Please note that there is ALWAYS a risk of data loss when chkdsk is run on a volume, ideally, you should have a backup of your files before running chkdsk.

    3 - virus or malware activity.  Some of these parasites can revoke your permissions on the folder of your profile, check the permissions on "C:\Documents and Settings\Andre" and make sure you have a full control on the folder.  Check this box until you try #1 or 2 above.

    Some of these parasites can also revoke your permissions in key areas of the registry and create real Dany on the machine that can prevent you to run some of your software.  Use Regedit to load your old profile hive (NTUSER. (DAT) in your profile folder (C:\Documents and Settings\Andre\NTUSER. (DAT) and make sure you have full control over the key.  In the advanced security settings to ensure that the child objects are inherit permissions from the parent and put a check mark on "replace entries permissions for all child objects...". "Click on apply and OK your way out.  See here for easy to follow instructions for loading and editing of remote registry hives: http://www.rwin.ch/xp-live/regedit.htm make sure you unload the hive when you're done, otherwise the changes will not be saved.

    These parasites can also revoke permission on the other key of registry and system files, you can use SubInACL to restore your permissions on these key objects, see here for more information:

    Solve installation errors using the SubInACL tool to repair the file and registry permissions

    John

  • I am not able to change the video quality for you tube. There are only two options 360 and Auto. Please help me.

    Hi I am experiencing strange problem for 15 to 20 days and I am not able to change the video quality for you tube. There are only two options 360 and Auto. Help me please if you can because I have a slow internet connection and I want to play video at 240, as it was before. Thanks in advance for your help.

    Could check you whether YouTube is to serve its HTML5 player or the player based on Flash? If you right click on the drive, short a context menu should appear. If the full Firefox context menu is displayed, press and release the ALT key to erase that. The last line of the menu short usually indicates which player he is.

    I'll assume HTML5 because...

    On Windows 7, Firefox should show a wide range of formats in the HTML5 player. However, if some of the features of media are disabled, preventing video MP4 decoding, then YouTube offers only 360 p (with WebM coding).

    If you have intentionally disabled Media Foundation and/or DirectShow in topic: config, then perhaps you would prefer to use the YouTube Flash Player? There are a few Add-ons that can force YouTube to serve you a Flash drive. Either of them will do, you don't need both:

  • I have a code 646 to update my computer. There are 7 updates specifically: KB974561, KB973704, KB973709, KB972581, KB973593, KB976416 and KB974234. Please help! __

    I need help on downloading these updates please!

    I have Vista...

    Download each update here and even manually install:
    http://www.Microsoft.com/downloads/en/results.aspx?FREETEXT=KB974234&displaylang=en&sType=s_basic

    He is the current solution for this specific error.

    TaurArian [MVP] 2005-2010 - Update Services

  • no operating system found devices and drivers missing please help

    my computer is an esprimo mobile v5535 equipped with windows vista I have gave me it for my son that he had ceased to function properly

    and he gave up on this subject. I cannot at present afford a laptop due to illness and I would like to restore

    . I tried to reboot several times but it does not, at present, I can only try restarts the device under voltage, then through reboot menus. my last attempt was using a drive recovery for windows whitch almost worked but stopped when he asked for the drivers and devices to load, but I don't really know what to do. the message that is displayed is that no operating system found that I was wondering if it would be interesting to give an expert to fix, although the cost could be a problem. Hope you good people can much help thanks james

    Hello

    1. have you made changes on the computer recently?

    Before using recovery discs that you can try the following methods.

    Method 1.
    In this scenario, you can always perform a repair boot which usually solves the startup problems automatically.
    Follow the articles for help on repair system.
    http://Windows.Microsoft.com/en-us/Windows-Vista/what-are-the-system-recovery-options-in-Windows-Vista
    http://Windows.Microsoft.com/en-us/Windows-Vista/startup-repair-frequently-asked-questions

    Method 2.
    Stage I.
    Please check if you are facing the same question when working in safe mode.
    a. restart your computer.
    b. when the computer starts, you will see your computer hardware are listed. When you see this information begins to tap the F8 on your keyboard key repeatedly until you are presented with the screen Windows Vista Advanced Boot Options.
    c. using the arrow keys, select the desired option of Mode without failure.
    d. press the Enter key on your keyboard to start in safe mode of Windows Vista.
    e. when Windows starts, use check and Internet explore if the problem persists.
     
    For additional information see the articles below.
    Start your computer in safe mode
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode
     
    Troubleshooting in safe mode
    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshooting-problems-while-in-safe-mode

    Stage II.
    If it works fine in safe mode try performing a clean boot in order to find the cause root.
    See the article below for instructions on how to start your computer in a clean boot state.
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    Note: When the diagnosis is complete do not forget to reset the computer to a normal startup. Follow step 7 in the above article.
     
    Method 3.
    I would also recommend to contact the computer manufacturer on the problem that you experience when you use the recovery disks.
     
    I hope this helps.

  • Smartphones blackBerry white screen on default settings and no internet, please help:)

    Hey guys,.

    I was wondering if someone can help me with my phone of girls

    I can't do access the internet it says unable to connect to the internet please try again later! However its connected to my hub home right now I checked its saying its connected.

    also when we try to email through its only give 1 option, which is email with enterprise server works and my daughter I just wanted to add her email addy, it had for centuries

    I was on the default screen, however, it's just a white screen with no info at all and when I try to load the help on the phone screens, he gets a full term on the small bar, then freezes?

    I took sim out and put it again and also his friends send their pins him however shes receive is not one of these applications?

    When I bought the phone, the guy said I'll put a few things for you so I don't know what he did lol

    hope some1 can help us

    Thanks.XX

    Hello and welcome to the forums!

    The only option of BES (corporate e-mail) and don't get don't not BBM guest would indicate to me that you don't have a BlackBerry of your carrier data plan. BBM and BIS (personal mail) require an appropriate data BB plan.

Maybe you are looking for