Weird error in cfquery, cannot use cfelse in cfquery?

< name cfargument = "StateID" type = "any" default = "" >

< cfargument name = "LocationID2" type = "any" default = "" >

< cfset var data = "" >

< cfquery datasource = "" #ds # "name ="data">"

SELECT s.State_ID s.State, l.Location_ID, l.Area, l.State_ID, r.Name, r.Location_ID

FROM State s, location, Restaurants r

WHERE 0 = 0

AND r.Location_ID = l.Location_ID

AND l.State_ID = s.State_ID

< cfif #ARGUMENTS. LocationID2 # LT 9 >

AND l.State_ID = (#ARGUMENTS. LocationID2 #)

< cfelse >

AND l.Location_ID = (#ARGUMENTS. LocationID2 #)

< / cfif >

This is the code in the component file, it works with a normal form with action.

But when I try to do with ajax, something like < cfdiv bind = «...» ' >, we get error with

58 :           AND l.St

ate_ID = (#ARGUMENTS.LocationID2#)
59 :           <cfelse>
60 :                AND l.Location_ID = (#ARGUMENTS.LocationID2#)
61 :           </cfif>

but when I remove the cfelse, it works without any errors. I feel weird, can you please give me some advice?

It's hard without the message error but just for fun, try to change your statement to the following:

AND l.State_ID = #val (ARGUMENT. LocationID2) #.

AND l.Location_ID = #val (ARGUMENT. LocationID2) #.

If it works, then the caller of the function does not provide the LocationID2 argument and because your statement does not require a value and values by default for ' ', arguments. LocationID2 is not a number.

Tags: ColdFusion

Similar Questions

  • When I start my computer, I receive critical errors and I cannot use my computer.

    original title: Windows 7 will not work.

    Windows 7 home premium 64-bit: something blocked the firewall of microsoft security essentials and people with reduced mobility.

    I have re-installed the basics of security, got the message critical error stopped firewall to use the recommended settings.

    After computer startup displays SE message found critical errors and I click on 'clean up' a computer must then re start.

    Process continues to repeat, I can't get on the computer.

    any suggestions?

    original title: Windows 7 will not work.

    Windows 7 home premium 64-bit: something blocked the firewall of microsoft security essentials and people with reduced mobility.

    I have re-installed the basics of security, got the message critical error stopped firewall to use the recommended settings.

    After computer startup displays SE message found critical errors and I click on 'clean up' a computer must then re start.

    Process continues to repeat, I can't get on the computer.

    any suggestions?

    Restore the default settings (according to the manufacturer's instructions) and then restore your reach installed since their product installation media/key/numbers of series and restore your data from your last backup of well known data.

  • Since I updated to Firefox 8 on Mac OS x 10.4.11, Firefox does not open more (not same previous versions downloaded via Safari). I get the error message "You cannot use Firefox with this version of Mac OS x" (translated from Dutch).

    I tried to create a new profile, the problem remains the same.

    None of the 3 accounts on this desktop computer can use Firefox. This has never been a problem. Today (14.11.11) I've updated Firefox to 8 and nothing more. Via Safari, I downloaded Firefox 7 to reinstall, same error message.

    From Firefox 4, Mac must have an Intel x 86 processor (which you do not have) and OSX 10.5 or higher (version OSX 10.4).

    The good news is that Firefox 3.6.24 still support OSX 10.4 and Mac with the PPC Mac architecture. The bad news is that the support for Firefox 3.6.x series is likely to end in the first quarter of 2012.

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

  • Error-201003 NiDAQmx cannot use a simulated device

    I am trying to simulate a PCI-6221 on windows 7 via MAX.  The device appears in MAX, but I can't run any signs of test on it and the error-201003 appears.  I use NiDAQ 9.0.2 which worked for me in the past.  Any information on this error would be appreciated, thanks.

    I still don't know what the problem was, but it has been dissipated by uninstalling all software OR my computer, and then reinstall LabView and nidaqmx.

  • 0xC004C008 error, but I cannot use the phone to fix

    so when Microsoft was the promotion to buy windows 8 pack upgrade from release, I did, I upgraded windows on my laptop and it worked perfectly, there for a year and a half and I have a new laptop that comes stock with windows 8, and the old notebooks HARD drive has been destroyed (I did it myself)

    Since then however, I have (this week) bought a desktop computer and I wanted to install windows 8 on it and as I already had a key I tried to install it but it gives me error 0xC004C008, I saw many solution about a phone call, but my problem is that I don't have a phone where I can call and this proses that's more than 6 months that this key has been inactive.

    be not then it just all right to work?

    I need help to make it work for I can activate my install of windows 8 and then begin to use the desktop computer

    any help will be much appreciated

    See you soon

    You will need to use the phone activation:

    1. press the Windows key + X , and then clickrun, and then type: slui.exe 4


    2. then press the ENTER"" key.

    3. Select your "country" in the list.

    4. choose the option "activate phone".

    5. stay on the phone (do not select/press all options) and wait for a person to help you with the activation.

    6. explain your problem clearly to the support person.

  • "You cannot use this version of the application Adobe After Effects CS6" even after the patch

    I get the error message "you cannot use this version of the application Adobe After Effects CS6 with this version of Mac OS x. You have Adobe After Effects CS6 11.0.1. I installed the patch, but still not the same error.

    Install the After Effects CS6 (11.0.3) updated:

    http://Adobe.LY/AE_CS6_1103

  • ORA-12032: cannot use column rowid

    Hello
    8.1.7 I have the following error:
    ORA-12032: cannot use the rowid column of materialized view log on 'chain '. "' string '.
    The solution is:
    Action: A full refresh is necessary before the next quick update. Add columns ROWID in the materialized view log, if necessary.


    How can I do a complete refresh before the next fast refresh or ROWID columns add? How do I know whether the ROWID columns add?
    Thank you.

    PS:
    my script is:
    ................
    ..............
    START WITH TO_DATE (July 6, 2010 17:57:48 "," dd-mon-yyyy hh24:mi:ss')
    NEXT SYSDATE + 1/24

    user522961 wrote:
    Hello
    8.1.7 I have the following error:
    ORA-12032: cannot use the rowid column of materialized view log on 'chain '. "' string '.
    The solution is:
    Action: A full refresh is necessary before the next quick update. Add columns ROWID in the materialized view log, if necessary.

    How can I do a complete refresh before the next fast refresh or ROWID columns add? How do I know whether the ROWID columns add?
    Thank you.

    run up

    EXECUTE DBMS_MVIEW.REFRESH('MV_NAME','C');
    
  • ORA-22992: cannot use LOB Locators selected from the remote tables...

    Oracle 10.2.1.0.4
    Solaris 10

    We try to access a table in another database via a db_link.

    The table we are trying to access has a LOB.

    We get the following error: ora-22992: cannot use LOB Locators selected from the remote tables.

    Is there a way to get around this? We need the data in the BLOB field.

    Thank you.

    See on metalink:

    ORA-22992 has a workaround solution in 10 gr 2
    DOC - ID: 436707.1

    Werner

  • Galaxy S4, HP 8600, error: cannot use this photo option

    Hello.  I have a problem with mobile printing to my HP 8600 N911g of my Samsung Galaxy S4 v4.2.2 Android running.

    According to the HP documentation this combination of devices should be able to use the built-in HP android printing solution, which basically means that I wouldn't install anything to print.  When I try to print from the browser on the phone, I choose the option 'print '.  I am able to locate and select the printer on my network.  I see the preview of the web page on the phone.  I click on the "print" button and get a message in the top of the screen saying "starts to print.  Then I get an error pop up at the bottom that says: "print error: cannot use this print option.

    I turned the market things.  The phone and the printer are on the same wifi network.  The printer I have installation ePrint as well as wifi direct (although I do not know what counts).  I tried to disable bluetooth.

    Clues?  Would appreciate some help here.

    PS - I also tried to download the HP ePrint app on the android market and had success with either... but I'm sure that I shouldn't do that, right?

    Thank you.

    I got a success...
    I tried to change the printer by 'search' again, then clicked on my printer and then it worked...

  • I cannot use windows update. The 80070490 error keeps coming back.

    I cannot use windows update.  The 80070490 error keeps coming back.

    I tried "System update tool", "windows repair" and I don't seem to be able to get upgrades using my DVD of windows.  What can I do?

    Any help would be much appreciated

    I cannot use windows update.  The 80070490 error keeps coming back.

    I tried "System update tool", "windows repair" and I don't seem to be able to get upgrades using my DVD of windows.  What can I do?

    Any help would be much appreciated

    Reset your Windows with this FixIt components update:
    How to reset the Windows Update components?

    Reset.

    Try to update.

    If it still does not work, try this...

    1. Start an elevated command prompt.
    2. Run the following commands pressing on enter after each line:

      net stop wuauserv

      CD %SystemRoot%\System32

      Ren C:\Windows\SoftwareDistribution SoftwareDistribution.old

      net start wuauserv

    3. Reset
    4. Try to update.

    * Important * When you do this, the following problems occur:

    • Updates that are currently downloaded but which have not yet been installed must be downloaded again by using Windows Update or Microsoft Update.
    • When you remove the Software Distribution folder, your download history is deleted.
    • If you currently receive updates from Microsoft Update and Windows Update, you will need to reselect this option from the Windows Update Web site.


    * Note *
    if the problem is resolved and you can successfully download and install the updates, you can delete the directory SoftwareDistribution.old to recover disk space.


    STILL no? We have something to try...

    Use this FixIt:
    How to get the latest version of the Windows Update Agent

    Reset.

    Save components WU:

    1. Start an elevated command prompt.
    2. Run the following commands pressing on enter after each line:

      regsvr32 Jscript.dll
      regsvr32 c:\windows\system32\wuapi.dll
      regsvr32 c:\windows\system32\wuaueng.dll

    Reset.

    Try to update.

    If it still does not work after that - repeat ONCE more that part...

    Reset your Windows with this FixIt components update:
    How to reset the Windows Update components?

    Reset.

    Try to update.

    Come back and let everyone know how you faired.

  • Error message "an error the system cannot find the file specified" when you use Bitlocker

    Original title: Bitlocker to go not accessible by car usb

    Here's the short of it: I decided to use Bitlocker To Go on my USB drive, and while he was to encrypt the drive I plugged a USB DVD - RW drive (it

    s a netbook) and then I got an error message in the Bitlocker program that says "an error the system cannot find the file specified."  I closed the error message and open the Bitlocker Unlock program, put my password and press on unlock and now it only that sit there and spin and the light flashes on my Batman of Seagate HARD drive as it is accessed.  The internal data of the car do not make the same sound, as he did while he was being... just encryption sounds like there are in an infinite loop.  The disc is good and has no errors, and I scanned with SeaTools.  I have a lot of important data on this drive, and I really don't want to lose anything.  Help!

    Hello 5thgear,

    Thank you for the question!

    I'm sorry to know that have problems you with Bitlocker. I get it right you get an error message "an error the system cannot find the file specified" when you run the bitlocker encryption.

    I need to ask you a question to help you best.

    Were there any changes (hardware or software) to the computer before the show?

    Click on the link below.

    http://blogs.technet.com/b/ASKCORE/archive/2010/08/04/issues-resulting-in-BitLocker-recovery-mode-and-their-resolution.aspx

    Answer to us if you are having problems with bitlocker or any other issue of Windows, and I'd be happy to help you again and try to correct the problem as soon as possible.

    Good day!

    Hope this information helps.

  • Update for the application manager has failed. Impossible to reinstall. Cannot use my apps. Get the 43 error message when I try to re - install. Is it possible to fix this problem without a wipe and load?

    Update for the application manager has failed. Impossible to reinstall. Cannot use my apps. Get the 43 error message when I try to re - install. Is it possible to fix this problem without a wipe and load?

    Error 43 https://forums.adobe.com/thread/2070909

  • I get the rror message. "Error adobe license for this product has stopped working. You cannot use this product at this time. You must repair the problem by uninstalling and then reinstalling this product or contact your administrative COMPUTING

    I get this error message. "Error adobe license for this product has stopped working. You cannot use this product at this time. You must repair the problem by uninstalling and then reinstalling this product or contact your COMPUTER administrator or Adobe customer support for assistance. (148: 3) "How can I fix it? When I reinstalled the software, I get a message that I have an invalid serial number.

    Hi John,.

    Could you please the version of Acrobat you are using, and also work on the operating system?

    To check the serial number of your product, you may return the following document.

    Quickly find your serial number

    If you are using windows you can see the following link for more information on the solution to the existing problem.

    https://helpx.Adobe.com/Creative-Suite/KB/error-licensing-stopped-Windows.html

    If you wish to contact Adobe support team, please visit the following link.

    http://helpx.Adobe.com/x-productkb/global/Service1.html

    Please click the blue button "Still need help" to connect with Adobe executives.

    Let us know how it goes. In case you need more assistance write us back.

    We would be happy to help you.

    Concerning

    Sukrit diallo

  • GETTING AN ERROR - slider 'P_REFCUR' cannot be used in the OPEN dynamic SQL stat

    DECLARE
    create or replace procedure partial_single (p_fileid in NUMBER, p_filename IN VARCHAR2 (2000), p_temptablename IN VARCHAR2 (2000), p_temppartialtablename IN VARCHAR2 (2000), p_retval ON the NUMBER)
    --)

    p_fileid NUMBER;
    p_filename VARCHAR2 (2000);
    p_temptablename VARCHAR2 (2000);
    p_temppartialtablename VARCHAR2 (2000);
    p_retval NUMBER;
    p_refcur types_pkg.return_cur;
    v_strquery varchar2 (4000);

    BEGIN

    p_fileid: = 5080;
    p_filename: = "TAGSUR1HM2011013111160838654.000019265";
    -p_temptablename: = "TEMP_RECORDS_MED_0004";
    p_temptablename: = 'TEMP_RECORDS_MED_DATE ';
    p_temppartialtablename: = 'TEMP_MED_PARTIAL_RECORDS_0002 ';
    p_retval: = 0;


    v_strquery: = 'SELECT imsi, connectedcallingnumber, callstart MIN (calleventstarttimestamp), SUM (calleventduration), MAX (sequence_number) sequencenumber, msisdn, max (callreleasetime) callreleasetime period';
    v_strquery: = v_strquery | ' A ' | p_temppartialtablename | ' GROUP BY connectedcallingnumber, imsi, msisdn';

    OPEN p_refcur - GETTING AN ERROR - slider 'P_REFCUR' cannot be used in a dynamic OPEN SQL statement
    FOR v_strquery;

    FOR CC IN (SELECT imsi,
    connectedcallingnumber,
    Callstart MIN (calleventstarttimestamp),
    Duration of the SUM (calleventduration),
    SequenceNumber MAX (sequence_number),
    MSISDN,
    Max (callreleasetime) callreleasetime
    OF TEMP_MED_PARTIAL_RECORDS_0002
    GROUP BY connectedcallingnumber, imsi, msisdn)

    LOOP

    UPDATE TEMP_RECORDS_MED_DATE
    SET calleventstarttimestamp = cc.callstart,
    calleventduration = calleventduration + cc.duration
    WHERE connectedcallingnumber = cc.connectedcallingnumber
    AND imsi = cc.imsi
    AND sequencenumber = cc.sequencenumber + 1
    AND msisdn = cc.msisdn
    AND calleventstarttimestamp = cc.callreleasetime;


    IF SQL % ROWCOUNT > 0
    THEN
    UPDATE TEMP_MED_PARTIAL_RECORDS_0002
    SET isprocessed = 1
    WHERE connectedcallingnumber = cc.connectedcallingnumber
    AND imsi = cc.imsi
    AND msisdn = cc.msisdn;
    - AND callreleasetime = cc.callreleasetime;

    ON THE OTHER

    UPDATE TEMP_MED_PARTIAL_RECORDS_0002
    SET calleventduration = calleventduration + cc.duration
    IMSI WHERE = cc.imsi
    AND msisdn = cc.msisdn
    AND callreleasetime = cc.callreleasetime
    AND calleventduration! = cc.duration;


    END IF;

    END LOOP;


    REMOVE FROM TEMP_MED_PARTIAL_RECORDS_0002
    WHERE isprocessed = 1;


    p_retval: = 0;

    -VALIDATION;
    / * EXCEPTION
    WHILE OTHERS
    THEN
    -RESTORATION;
    p_retval: = 1;
    p3_errorlog ("partial" p_fileid, SQLERRM, |) ':' || p_filename);
    COMMIT;
    */
    END;

    Is - what your refcursor has a return type? In this case you can not open it with dynamic SQL. Change the Refcursor as a weakly typed cursor and give it a try.

  • Cannot use Adobe Reader to view PDFS in web browser error

    I have a new computer and installed Acrobat Pro.  When I try to click on the PDF links in the browser, I get an error:

    Cannot use Adobe Reader to view the PDF in the browser.

    I want to be able to open these links using Acrobat Pro.  What can I do in Internet Explorer so I don't always get these errors, and so pdfs open automatically with the help of Acrobat Pro?

    Steve

    Acrobat 8.1 was not designed for Windows 7.

Maybe you are looking for