Capturing the ID of an insertion request

I have a bit of code here, but the question is pretty basic, if you could bare with me. I need to know the ID of the row of the table newly created in the query "rs_insert_1." I've tried a few things but because this download form double happens on one page I don't know how to capture this ID.

< cfif NEQ of IsDefined ('form.file_one') AND Trim (form.file_one) "" > "".
< cffile
action = "upload".
destination = "" #dstfile # ""
FileField = "file_one."
nameconflict = "overwrite" >

< cfset cookie.file_one = ' #cffile.serverfile # ' >
< cfset cookie.file_one_ext = ' #cffile.serverfileext # ' >

< name cfquery ="rs_insert_1" datasource = "062409js06ag" >
Insert Into presets
(pfilename, pfilenameext, artistid artistname, presetname, presetgenre, bpm, soundslike, Daw, vsts, license, instructions)
Values
(< cfqueryparam value = "" #cookie.file_one # "cfsqltype =" cf_sql_varchar">)
< cfqueryparam value = "" #cookie.file_one_ext # "cfsqltype ="cf_sql_varchar">, #findname.ID #," #findname.uname # "," #requiredname # "," #requiredgenre # "," #requiredbpm # "," #requiredsoundslike # "," #requireddaw # "," #requiredvst # "," #requiredlicense # "," #requiredinstructions # ")"
< / cfquery >

< cfset cookie.mp3id = "#id #" > <-this code gives me the id is undefined error      

< / cfif >

<!-Begin treatment second submission of file->

< cfset subdir2 = #GetCurrentTemplatePath () # >
(< cfset subdir2='#replace(subdir2,'\upload1.cfm','\presetsmp3') #' >
< cfset dstfile2 =' #subdir2 #' >

< cfif NEQ of IsDefined ('form.file_two') AND Trim (form.file_two) "" > "".
< cffile
action = "upload".
destination = "" #dstfile2 # ""
FileField = "file_two."
nameconflict = "overwrite" >

< cfset cookie.file_two = ' #cffile.serverfile # ' >
< cfset cookie.file_two_ext = ' #cffile.serverfileext # ' >

< name cfquery ="rs_insert_2" datasource = "062409js06ag" >
"update presets set pmp3preview = < cfqueryparam value =" "#cookie.file_two #" cfsqltype = "cf_sql_varchar" >, pmp3previewext = < cfqueryparam value = "#cookie.file_two_ext #" cfsqltype = "cf_sql_varchar" > where id = < cfoutput > #cookie.mp3id # < / cfoutput >

< / cfquery >

< / cfif >

You did not read the previous answer with sufficient attention.  This response only works for the database specified and if you use another.

With access, you will have to do a

Select max (id)

from yourtable

where as many conditions as you can think of is met.

Tags: ColdFusion

Similar Questions

  • Capture the event "media card inserted".

    Hello

    JDE 4.2.1 using. (or newer)? I would like to know if there is a way to intercept the event 'media card inserted' (from Java) that appears when an SD card is inserted in the camera - I'm using a Blackerry 8120 device.

    Thank you.

    Yes, you can use a FileSystemListener to listen to it.

  • Capture the HTTP request parameters

    Hi people,

    I am completely new to Foglight. Please bear with me. My question: is it possible to use Foglight to capture the query parameters in a HTTP container?

    We have a situation in production where some clients send content-type: application/x-www-formulaires-urlencoded where the body is xml. so, normally, they should send text/xml. Now, this wasn't a problem until recently, something happened on the side server. Whenever the content type has the above, an external code to our application would attempt to recover the query parameters before our application is called. It would be nice if the content was x-www-form. But it's not. So when this external code request parameters, the input stream is read, see and discarded because it cannot be parsed in the query parameters. Applications for the user then failed at the application level as ELE entered WHAT XML has not been received.

    The question came three days ago and disappeared yesterday. So, to rephrase my question: is it possible that some unexperience Foglight user could be the cause Foghlight try to fecth query parameters to detect the type of content?

    Thank you very much.

    Maxbridge.

    What agents run on that server and your environment?

    The options for the capture of the http parameters are usually:

    1 FxM (Foglight experience Monitor) is a passive listener (sniffer web) who gets his information of span port or network tap fxm Gets a copy of the traffic and does not affect the flow of the HTTP (web traffic does NOT pass through the device). Since FxM does it all the time and does not receive a copy of the traffic it does not fit the behavior.

    2. a Java agent has the ability to collect traces if someone is activate the mechanism of tracing with the box that says specifically the Java agent to collect the http settings. What is happening inside the Java Server, so I'm not sure it fits the behavior you MENTION. Keep also in mind that Java agent do NOT trace all requests, it is activate followed maually or by a rule and do on a limited number of request for a limited time.

    It should very easy to test this use cases, to go on your test server, start tracing with http settings and see if there is impact, if impact open cases emergency assistance (sev 1) so dev may fix this problem. I have not seen this behavior in one installation within 3 to 4 years since we added the collection of http parameters, so if this is the case we want to dev top as soon as possible. If that's the reason workaround until dev is trace without http parameters.

    3. agent of .NET collection of parameters for queries that are taking over X seconds. I doubt that is the case, as the .NET agent does it all the time, he would not stop doing (and in your case, it seemed like the behavior stopped).

    Golan

  • CAPTURE THE OUTPUT IN INSERT INTO SELECT AND DELETE

    Hi all


    INSERT into employee_history_arch select * from employee_history where employee_status = 'CP' and action_dt < (sysdate-32);
    commit;

    delete from employee_history where employee_status = 'CP' and action_dt < (sysdate-32);
    commit;

    I must capture both the output of the insert and delete the sql query and compare the two values for validation. I shouldn't use select count (*) before the delete statement. I shud exactly capture the output... How to do? Please help me

    We will have ' 30 deleted rows' or ' 30 inserted rows"in our tool... I need to capture that 'put out' in a variable and validate against the other

    This should be easy.

    SQL> set serverout on
    SQL> DECLARE
      2    v_rows_inserted PLS_INTEGER;
      3    v_rows_deleted  PLS_INTEGER;
      4  BEGIN
      5    INSERT INTO emp_temp
      6      SELECT * FROM emp WHERE deptno = 20;
      7    v_rows_inserted := SQL%ROWCOUNT;
      8    dbms_output.put_line('Rows Inserted: ' || v_rows_inserted);
      9    DELETE FROM EMP WHERE deptno = 20;
     10    v_rows_deleted := SQL%ROWCOUNT;
     11    dbms_output.put_line('Rows Deleted: ' || v_rows_deleted);
     12    IF v_rows_inserted = v_rows_deleted THEN
     13      dbms_output.put_line('They are same!');
     14    ELSE
     15      dbms_output.put_line('They are NOT same!');
     16    END IF;
     17  END;
     18  /
    Rows Inserted: 7
    Rows Deleted: 7
    They are same!
    
    PL/SQL procedure successfully completed.
    
  • How to capture the result of the INSERTION/update in a variable?

    Hi friends, look at this:

    SQL > UPDATE MyTable SET MyColumn = 100;
    -1000 lines to update

    How do I capture the message "1000 rows updated" in a variable in a stored procedure?

    Concerning

    after update stmt writing below stmt in the procedure;

    dbms_output.put_line (' lines = ' |) TO_CHAR(SQL%ROWCOUNT));)

    Published by: J2EE_Life on April 26, 2012 08:40

  • Even after inserting a disc in the CD/DVD drive, my computer asks once again for a disc in the drive. "Please insert a disk into drive E".

    All of a sudden my computer asks 'for a disc in the drive. Please insert a disk into drive E ". I put an and closed several times and it says all right, then it is said again and again the same message. ?? Help

    Original title: disc E

    Hello

    Thanks a lot for posting your request on this forum. You have reached the right place, and I'll do my best to help you with this question.

    It would be awesome if you can explain this problem with greater clarity. Please provide the following information to help you better with this problem.

    (1) Windows operating system you are using on the computer?

    (2) what exactly you are trying to do on the computer? You try to install games and Applications using the installation CD/DVD?

    (3) what is the exact full error message you get?

    (4) when exactly you get this error message? It's when you try to start the computer?

    (5) are you can play any CD/DVD using the CD/DVD drive on the computer?

    (6) what are the recent changes that you made to your computer before this problem?

    Please get back to us with all the relevant information about this question for assistance. You can see the article below, so that it would be helpful for you to include all the required information.

    Suggestions for a question on the help forums

    Hope it will be useful.

  • What is the best way to store the RCS for an insert/update in this rec

    Oracle on Win 64 non-conteneur 12.1.0.2

    When a record in one table is inserted or updated, what would be the best way to store the RCS for this record in this folder.

    I thought of a line after trigger, but did not know if this trigger to store the current_scn would still fire that trigger again (recursive trigger).

    Someone at - he a good idea of what the best way is to do?  The devs don't want to store the pk and the SNA in yet another table...

    Yes, row_dependencies would be the best way to go.  But mgmt doesn't recreate all tables for this.

    3rd party applications retrieve data from tables (all data).  We are looking for a way for them to just pull what is new or updated updated since their last sweater.

    I suggest that you try again and give all OF THE REQUIREMENTS.

    You have rejected ANY answer given and he justified using 'hidden' on what knowledge management or the devs want or do not want to. Stop making us guess what are the requirements and constraints. If you want a real answer then tell us ALL the news.

    When a record in one table is inserted or updated, what would be the best way to store the RCS for this record in this folder.

    Solomon answered repeatedly. If you want to add a column to a table to store the then "best" SNA is to let the Oracle to do this for you automatically by using the DEPENDENCY LINE.

    As he says also re-create the table to add this clause will be MUCH MORE EFFECTIVE that everything THAT you can do it manually. It will be also more accurate because Oracle will fill the value ORA_ROWSCN with the SNA at the time the line was committed. You, as long as user, can't fill a column in function when a line is engaged since real VALIDATION belongs to a transaction, not the line or the trigger that you use.

    Yes - there are two drawbacks to this method:

    1. you need to re-create the table

    2. you cannot add an index to this "hidden" column

    The devs don't want to store the pk and the SNA in yet another table...

    Then? Who cares what the devs want to do? You want the BEST solution? Next, you will need to put aside personal preferences and determine what is the 'best' solution. Why it is important that certain dev wants to do this or not?

    OK, the problem of biz is now, 3rd party external users are an all-wheel drive large number of tables in the database via the API that we wrote.  That was obviously interrupted OLTP during the day.  To reduce to the minimum, we want for them just to extract data that has been inserted/updated since their last sweater.

    It is the definition of a "replica" DB Then why don't you consider a real replicated DB? You can use DataGuard and have replicated DB which is read only that can be used to generate reports. Oracle does ALL the work to keep ALL the tables in sync. You and your developers do NOTHING!

    We thought that store the RCS higher their last sweater would allow the API to extract only data with YVERT higher than their last data pull CHN.

    OK - except you keep rejecting solutions actually do. Ask you questions about the SNA stored in the same table, but then reject the solution that does this. And then you add your "devs" don't want to store the info in a new table either.

    Then your solutions must ONLY use the replication or Log Miner. The REDO logs have all changes, if you want to extract yourself. Replication (e.g., DataGuard) will use these logs for you to maintain a replicated database.

    We thought about it, but recreate all tables in production with ROWDEPENDENCIES as well as dealing with CF and other dependencies idea this was shot.

    Well you NEVER mentioned you "thought that" and rejected it. And you NEVER mentioned anything about FKs and other dependencies. What is FKs and other dependencies which prevents this working solution? Tell us! Give us ALL the information.

    Wouldn't a trigger AFTER LINE capture the commit YVERT?  Or is after really not after validation?

    No - a trigger has NOT one commit. A trigger runs as a step in a transaction. Validation applies to the entire transaction. Until you, or Oracle, issues a commit, there is NO "committed SNA" to be stored as ORA_ROWSCN.

    You can easily see that for yourself. Create a simple table with dependencies of the line and then update two different sessions.

    create the table emp_scn rowdependencies in select * from emp where rownum<>

    Select empno, emp_scn ora_rowscn

    Update emp_scn set work = 'b' where empno = 7499

    commit;

    The first SELECT statement will show you that each row has the same SNA.

    EMPNO, ORA_ROWSCN

    7369,70622201

    7499,70622201

    7521,70622201

    Now, do the update (but no commit), then SELECT it

    EMPNO, ORA_ROWSCN

    7369,70622201

    7499,

    7521,70622201

    Where is the value of 7499? This session will NOT see a value for the changed lines in the current transaction. Other sessions will still see the old value.

    Now do the validation, then SELECT

    EMPNO, ORA_ROWSCN

    7369,70622201

    7499,70622301

    7521,70622201

    7499 now has a new and different value than the other lines. It will not be this new value until the validation occurs.

    Yes, row_dependencies would be the best way to go.  But mgmt doesn't recreate all tables for this.

    Well, you got the answer you want. You ask the best way. Now, you say that you were told the best way. But now you don't like the answer.

    How is it our fault? Your question has been answered wasn't she?

    Here are the facts:

    1 oracle creates a history of changes - the REDO log files

    2. you can use Log Miner to extract these changes

    3. you can create your own change log by adding a log file of MV to your table.

    4. you can then write a custom code to use this MV log file to determine which rows to "reproduce".

    So far reject you all THE POSSIBLE solutions.

    Accept it or change the requirements to allow one of the solutions proposed to be used.

    Personally, if I HAD to use a customized solution, I would use a MV journal to record the ROWID of the lines that have changed (for tables ROWID cannot be changed). I would then extract the appropriate lines by pulling on the lines corresponding to these row ID.

    Even that has problems since a line can be changed several times and children lines can also be amended several times - these questions FK you mentioned.

    I suggest you read this entire thread on AskTom a dozen years ago. It addresses ALL these issues.

    https://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:16998677475837

    Then in your next reply on this topic give us a summary of where some things with your question and what help you further expect.

  • Capture the event of hyperlink and value

    Hi all

    I have a hyperlink on one column of the report, and when I click on the hyperlink, need me a URL. Now, I need to enter the time, the user has clicked on the URL and update a DB table column. So I created a dynamic event to update something, but I'm not able to get the hyperlink event. When I select the event 'Click' and 'Selection Type' as 'Élément', the report column does not appear on the LOV item (s). Can dynamic Actions be based only on the click on page elements?

    If so, are there any other to capture this event Hyperlink and set the value? Also, as my target 'Column link' is 'URL', I can't put any value for items it!

    Help, please
    Robet

    Robette,
    Add a

    wwv_flow.g_unrecoverable_error: = TRUE;

    After the line of appeal owa_util.redirect_url

    Otherwise the PLSQL process continues to request/get the next page and the piece of code that doesn't stop that.

  • How to capture the values

    Hi friends,

    I came across one of the scenarios, i.e.

    In my application, I have a report page and a form page, the report and the form are based on the unique table...

    If a record is inserted medium, means it will be inserted in the report...

    in the region of report I have an button called then if I clicked the next button means a form page must open to capture all values which is inserted in the report of each field of the form...

    How to capture the values of the ratio to form shortly after clicking on the button NEXT in the region of report...

    Help me solve this question friends,

    Thank you
    Saro...

    Hello

    For the Next button , which is located in the region of report,

    change the Action: to redirect to the page and give the respective page number: (i.e.) the target...

    And specify the value of these items: what are all the elements of the target.

    with these values: describe the elements of the source where you will take the values of the corresponding points...

    Izz all wells
    GTA...

  • Can we capture the event of show/hide layer in PS?

    Hi all..!!!

    I have a request to all the coders of Photoshop! We can capture the click event of show/hide layers in Photoshop... ? I need to know my code if the user clicked on the eye of show/hide layer... !!

    Pls answer soon... !!

    Thank you!

    http://forums.Adobe.com/thread/858391?TSTART=0

  • Capture the Grand Total &amp; calculations on it.

    Hello

    We have a report columns-> 1) location 2) 3) Total sales %.

    In column 2, we show the total general for the 2nd column, namely SALES in a table view.

    Here the calculated column (Total sales %) = sales (value line) / Total big (sales).

    Here we see how sales for this location is contribuing.

    Can we some how capture the total general. We don't have dashboard... Please suggest that this can be achieved in OBIEE. I see here that we cannot use variables also can help combiing two request.

    Thank you
    Dev

    For grand Total (sales) using the formula:
    Sum (table.sales)
    or if it does not work
    Sum (Sum (table.sales))

  • So, for the 3rd TIME WHEN I REQUEST SUPPLICANT why NOT update only FF updated my browser?

    You see, I ask myself this same question twice before, because Firefox has once more for the third time last updated browser DESPITE MY PLAIDANT ASK TWICE BEFORE NOT to DO SO. but now I have a platform to make public DISHONESY of Firefox, put to task for defying a very adamant demand, specifically NOT UPDATE MY BROWSER, CIRCUMSTANCES THAT systematically, repeatedly occurred throughout all these years I've been with Firefox since 2005.

    How is it that Firefox continues to deliberately defy, ignore the wishes of its customers most loyal me inflamed beyond words, when I repeatedly made KNOWN QUITE WELL NOT to HAVE MY BROWSER updated.

    BUT NOW, AFTER ALL THIS TIME, TOGETHER WITH THE INSIGHT I HAVE RUN AS ONE INDUSTRY COMPUTER SPECIALIST I know very well why Firefox CONTINUES THIS PRACTICE WITH ABANDON.

    1. they do not like anyone was sleeping with the subject: config (then why did you never included it in the first place) as I do.

    2. they don't like anyone made modules incompatible extensions again as I do.

    3. they do not like someone tampering Firefox as I do.

    And all Firefox should do to reduce to nothing all the meticulous work I spend change about: config. configurations to accommodate my own and the needs of my company and all the hard work. spend time of activation of newly incompatible extensions, I need to work as effectively as possibleamong other things that I tweaked, THAT I EXACTLY WHAT YOU DO for THE REASONS I GAVE. YOU deliberately, to DO so hatefully. And that's the final reason for YOUR contempt total without taking account of the request of a customer. In addition, YOU, fIREFOX feel that since you wrote the code, and the owner of the code, YOU can insist USERS to follow the protocols of Firefox exactly as I ask.

    Another example of YOUR dictatorial to browse the web - what approach YOU feel that no one should dare to take a peek to content that is not the level of WHAT YOU BELIEVE IS purity AND ALL OTHER CONTENT CORROMPRE THE MORALS OF OUR YOUTH.

    In one of the cases where my browser has been updated despite my unyielding position against it, someone in YOUR ORGANIZATION has removed several sites for adults STRICTLY STRAIGHT to my favorites.

    SO now, NOT ONLY DO you HAVE AN ATTITUDE INTRUSIVE big BROTHER THAT NOBODY DARE DEVIATE FROM the OFFICIAL FIREFOX BROWSING PROTOCOLS BUT NOW YOU have put in PLACE A CENSURER CAMPAIGN ON WHAT YOU CAN READ, WATCH at all SIMPLY BOOKMARK or.

    BUT IT IS EVEN WORSE, MUCH WORSE. THE LAST TIME TWO YOU UPDATED MY BROWSER AGAINST MY WILL, YOU GAVE ME THE REASON MORE LAME MORE STUPID, INSULTING, STUPID WHY YOU UPDATED TWICE BEFORE AS IF THEY WERE JUST CIRCUMSTANCES THAT OTHERWISE NEVER WOULD HAVE VIOLATED AS WELL AS THE PRIVACY BEING THE TERRIBLE REBEL COMMERCIAL PRACTICES, ARROGANT AND SIMPLY TO YOUR MITIGATING CUSTOMER. BUT NOW IN ADDITION TO PROVE YOURSELF TO BE A MEGALOMANIACAL SOCIOPATH YOU HAVE REVEALED YOURSELF TO BE ABSOLUTE LIARS CHRONICLES.

    AND IT OF BECAUSE I AM RESPONSIBLE FOR MY COMPUTER SERVICE COMPANY AND HAVE A LOT OF COMPUTERS UNDER MY CONTROL AND SUPERVISION. I HAVE ONLY RECENTLY PASSED ON SOME OF OUR COMPUTERS FROM IE TO FIREFOX AS A TEST AND I AM DEPRIVED OF WHAT HAPPENED BETWEEN THE COMPUTERS THAT WERE USING FIREFOX AS A TEST STUDY.

    AND WHILE THE TRUTH BEING WHAT IT IS, YOU ARE CAREFUL NOT TO MESS WITH MY BROWSER, AS IT IS WELL CONFIGURED TO NOT UPDATE, WHICH, IN YOUR HONOR, YOU GAVE HIM A LARGE DOCK, BUT YOU GRIMLY UPDATED SIX COMPUTERS THAT WERE PART OF OUR TEST STUDY
    WHO HAD THE SAME CONFIGURATION OF BROWSER REQUEST NOT TO BE UPDATED BUT THAT YOU UPDATED HOWEVER. THESE COMPUTERS WERE PART OF A STUDY OF PRODUCTIVITY WHICH, BY UPDATING IT SET ALL THE SMALL EXPERIENCE OF OUR BACK A LITTLE BIT.

    SO, WHAT AM I GOING TO DO WITH YOU? I HAVE TO REALLY THINK LONG AND SERIOUSLY ON HOW TO RESPOND TO AN ORGANIZATION THAT HAS SHOWN NOTHING BUT THE WORST KIND OF APATHY, PRACTICES DISHONEST COMMERCIAL I'VE SEEN SINCE BEING IN THE COMPUTER SECTOR.

    Automatic updates can sometimes damage the files in the profile, and I always read several web for a complaint indicating that it has not changed. This is one of the reasons why I don't like the automatic updates.

  • Can not do a screen shot using the command shift 4. Unable to capture the States. I restart the Mac.

    Can not do a screen shot using the command shift 4. Unable to capture the States. I restart the Mac.

    It is to capture a piece of the element you want to screenshot, make a fire using full-screen control + 3

  • Satellite A30 crashes when starting the Bios when you insert a USB

    My A30-104 laptop hangs when starting the bios, whenever I insert a USB key into the USB port.
    The only message that appears at the bottom of the screen and the message is something like this:
    Press F12 for the boot configuration or F12 for...

    Pressing F2 or F12 does not change the start state.
    Note that Microsoft XP Home SP2 is installed on the machine.
    No idea why startup is suspended?

    Thank you
    Sam

    Maybe the laptop tries to start the USB, but it is not possible to
    It's just a suggestion, but I remember that something similar happened to a friend of mine.
    The printer is connected to the USB and the laptop could not start in the OS.

    Well, maybe we can solve this problem on the laptop you by changing the boot order in the BIOS.
    Please enter the BIOS and change the order on the disk HARD - CD - etc.
    Make sure that the HARD drive was chosen first

  • Cannot open the DVD drive to insert a CD or DVD

    My DVD player won't open and a small rectangular orange light flashes when I press the Open button. I checked and the system says that the drive is functional. Anyone has any ideas how to fix?

    Thank you.

    The CD/DVD drive provides a small hole. Try using the thin wire and insert it into the hole. This should open the CD/DVD drive manually.

Maybe you are looking for

  • Strange problem with flash player

    Every time I open a Web site with a flash (Youtube, flash games), Firefox crashes. I tried to reinstall Firefox and flash player, but it does not solve this problemSorry for my English

  • Satellite L505 - 10 p is identified as L500 - why

    Hi guys,. recently bought a Toshiba L505 - 10 p and had to reinstall the operating system to use it in my language.So far so good, I downloaded all the drivers and everything works normally. However, a question is asked to run that software and the S

  • BIOS for Pavilion a1767c Vista 32 bit

    I was updating my Bios when we lost the power.  Now I get error of starting block followed by a BIOS Checksum error.  I tried reseting the CMOS and passwords BIOS but no luck. I have problems flashing my BIOS using the utility back 'PHLASH16' with th

  • exceptional E Olesys error in the module Exe H. Csmiley to 0003c0f5

    As indicated in the title, I get this box popping up whenever I start the computer?

  • Icon mail is missing

    Need to change my e-mail profile, but it is missing from the control panel.