Can you use a query object in QOQ Query?

Hi, I have a component with two functions. One does a query
and simply returns the query object (getItem), the other function
in this CFC needs to query this query object by using a QOQ.
However, it's choking on the part of the "FROM" in the getItemTitle
function. Am I calling the internal function incorrectly?
If I dump the results of the getItem function it returns the
query correctly. So the problem is definately with the QOQ query. I
have attached my CFC code.
Thanks,
Mikey.

Heya Dan,
Taking away the #'s doesn't solve it, cos it then throws an
error about the ()'s I also tried taking them out but no luck.
Here's my latest code, which STILL gives the same error. I'm
confused. Porbably missing something really simple here.
Thanks,
Mikey.
<cfcomponent hint="item" displayname="item"
output="false">
<cffunction name="init" returntype="item" output="false"
access="public">
<cfargument name="itemID" type="numeric" required="true"
/>
<cfset variables.itemID = arguments.itemID />
<cfreturn this />
</cffunction>
<cffunction name="getItem" returntype="query"
output="true" access="public" displayname="getItem">
<cfset var local = {} />
<cfquery name="local.item" datasource="#request.dsn#"
username="#request.username#" password="#request.password#">
SELECT *
FROM items
WHERE itemID = <cfqueryparam value="#variables.itemID#"
cfsqltype="cf_sql_integer" />
</cfquery>
<cfreturn local.item />
</cffunction>
<cffunction name="getItemTitle" returntype="string"
output="true" access="public" displayname="getItemTitle">
<cfset var local = {} />
<cfset local.itemObject = getItem() />
<cfquery name="local.item" dbtype="query">
SELECT itemTitle
FROM #local.itemObject#
</cfquery>
<cfreturn local.item.itemTitle />
</cffunction>
</cfcomponent>

Similar Messages

  • (261718088) Q: Can you use xm:multiple with Objects other than String?

    Q: Can you use xm:multiple with Objects other than Strings?
    <br>
    A: You bet. Attached find a text file with some code from the example I showed
    today, a version of the multipleSayHiTo() method that has a parameter of an Array
    of Person objects rather than a parameter of an Array of Strings. The code within
    the text file comes from the Greeting.jws file (the Greeting Web Service).
    [multiple.txt]

    So you are saying that the recovery discs I made do include the copy of windows that was originally installed?
    Absolutely! They will restore the hard disk to its original out-of-the-box contents. Follow the instructions in the section Restoring from recovery DVDs/media, which begins on p. 73 of the User's Guide.
       Satellite A660 Series User’s Guide
    maybe i can make a deal with wd to have them swap this drive out for the BEKT instead...
    That would be a good idea in any case.
    As I said, the 10-fc12-045d error would not be due to the drive's being AFT, but more likely the discs are not being read properly. New discs can be obtained from Toshiba. Scroll down to Get Recovery Media here
    -Jerry

  • In Oracle, Can i use if exits clause in a query?

    In Oracle, Can i use if exits clause in a query?
    For example, "Drop table if exists tablename"
    Is the above command valid in oracle?
    If not then is there any equivalent for if exists clause?

    Here is the SP code code that might help you to Drop a table if it exisit, whith out throwing an error if the table is not present.
    create or replace PROCEDURE DROP_TABLE(TabName in Varchar2)
    IS
    temp number:=0;
    tes VARCHAR2 (200) := TabName;
    drp_stmt VARCHAR2 (200):=null;
    BEGIN
    select count(*) into temp from user_tables where TABLE_NAME = tes ;
    if temp =1 then
    drp_stmt := 'Drop Table '||tes;
    EXECUTE IMMEDIATE drp_stmt;
    end if;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    END DROP_TABLE;
    Call this SP in your Scripts by : CALL DROP_TABLE ('<Table Name>')
    Hope this Helps!
    Regards,
    Kaarthiik

  • Can I use a OID rule for a Query SQL Lov of BIP?

    Hi. Can I use OID data (rules) for a query sql lov in BIP? Ex. filters users/store.
    Thank you.
    R.

    Hi,
    I didn't look at the example, but if you want to secure your application then you should use container managed security. Read this .
    Anyway, you could add this before return "good"; in your login_action()
    FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("username", user);Then, you can access this from anywhere in the application by using #{sessionScope.username}.
    Pedja

  • Can you use a soft tip stylus type pen on an IdeaTab A1107 Tablet screen?

    I recently purchased an IdeaTab A1107 Tablet, which I believe is the same as the IdeaTab A1, just with the Android 4.0 OS.  My wife is having trouble always hitting the correct buttons on the screen (7" screen).  Can you use a soft tip stylus type pen or other stylus on an IdeaTab A1107 Tablet screen?  Would that be easier than tapping the screen with your finger?
    Thank You ........
    Solved!
    Go to Solution.

    You can use a stylus that's sold as being designed to work with "capacitive screens" - not just any stylus will do.
    You can also use any conductive object as a stylus on the A1 screen, as long as your skin is touching the part of the object that is conductive.

  • How do you use a TimeZone object?

    Hi,
    When I did this:
    TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles");
    GregorianCalendar calendar = new GregorianCalendar(tz, Locale.US);
    Date now = calendar.getTime();
    System.out.println(now);I expected the current time on my computer to be converted to the time in Los Angeles--but that didn't happen. The code ouputs the current time on my computer. So, I'm left wondering what a TimeZone object is used for?

    A TimeZone object is used by a Calendar when you ask it to do date and time arithmetic, and when you set its value. If you say "set the time to 4 am" then the code needs to convert that to an offset relative to a time in GMT, and clearly it would need to know what time zone you meant that 4 am to be in.
    But you used a Date object and printed it. Date doesn't have a time zone attribute. Yes, I know you got the Date from a Calendar but since a Date doesn't have a time zone, it can't magically interpret itself in terms of the Calendar you got it from.
    Fortunately SimpleDateFormat does have a time zone attribute. So if you want to print a date interpreted in a certain time zone, that's what you would use. And generally you should use SimpleDateFormat to turn dates into text anyway.

  • Can you use color splash on a photo that was edited in black and white or do you have to mask the photo before editing it in black and white?

    can you use color splash on a photo that was edited in black and white or do you have to mask the photo before editing it in black and white?

    I think you are asking whether it makes an difference whether you create the mask before or after you edit the black & white version. The answer is that since the color version and the b&w version are on different layers (as seen here), it makes no difference when you edit the b&w version.
    Also consider another technique that separates the color element in the image. Here, the area surrounding the color image is a line interpretation of the scene, similar to a Tone Line Conversion, a technique that was created with film many years ago.  (I am so old,  I still remember how it was done.) This is how to get the result similar to the one shown above but with a line illustration created in Photoshop replacing the b&w layer version:
    1. Open an image. This technique is more successful if the image you select has many clearly defined edges.
    2. Make a duplicate layer. (Cmd+J). It becomes Layer 1
    3. With Layer 1 chosen, go to Filter>Blur>Smart Blur. Set the Quality to High and the Mode to Edge Only. The default settings are Radius 3.0, Threshold 25.0. To increase the amount of detail in the line conversion, raise the Radius setting. Use the white-on-black illustration within Smart Blur as a guide. Then click OK.
    4. The line illustration will appear as white lines in a black background. To change this to black-on-white, choose Image>Adjustments>Invert.
    5. Insert a new layer below Layer 1. It will serve as the background for the line illustration. To do this, hold down the Command key while clicking on the New Layer symbol at the bottom of the Layers panel. It is the second symbol from the right. It will become Layer 2.
    6. Fill this new layer with a light color. To do this, click on the Foreground Color symbol in the Tools section. It will open the Color Picker. Choose a light color and click OK.
    7. Choose Edit>Fill. Use: Foreground Color.  Mode: Normal. Opacity: 100% and click OK. Layer 2 will fill with the color. Although it will not appear in the image because Layer 1 is above it, a quick check of the Layers panel will confirm that the color you chose has filled Layer 2.
    8. Remove the white area from in Layer 1. Go to Layer 1. Choose the Magic Wand tool. Uncheck the Contiguous box in the Options Bar and click in a white area of the image. Next, click the Delete key.  Choose Select>Deselect to remove the marching ants. 
    9. (Optional)  You may now change the line illustration in Layer 1 from black to a dark color compatible with the color in Layer 2. To choose the color, click on the Foreground Color symbol in the Tools section. It will open the Color Picker. Choose a suitable dark color and click OK. While in Layer 1, click the first symbol next to the word  Lock:  in the Layers panel above Layer 1. This will prevent the dark color from appearing in the blank area of Layer 1. Choose Edit>Fill. Use: Foreground Color.  Mode: Normal. Opacity: 100% and click OK. The black lines will change to the dark color you chose.
    10. Combine Layers1 and 2: While in Layer 1, choose Layer>Merge Down. The layers are combined into a single layer called Layer 2.
    11.  Add a black mask to Layer 2 by clicking on the Mask symbol at the bottom of the Layers panel. It is the symbol to the right of the fx symbol. Where you would like full color objects to appear within the line rendition, paint in white on the black mask with a brush set to either soft-edge or hard-edge as the illustration and your taste dictate.  

  • Can you use the same Apple ID on more than one MacBook Pro for updates and applications?

    We just got a few new MacBook Pro's and when I went to install updates it said I need to make an Apple ID.  Can you use the same Apple ID and email address for that Apple ID on multiple machines, or do I need them both to be unique per machine?  I'm not sure how that works when you have multiple machines.

    An Apple ID is a user name you use for everything you do with Apple. Creating an account for an Apple service, such as the iTunes Store or the App Store, creates an Apple ID. Apple ID allows you to access other Apple services.   So you can use the same Apple ID for up to 10 Macs associated with it.
    To create an Apple ID you need to enter  your full name and your primary email address as your Apple ID. This will be used as the contact email address for your account.

  • How many Ipods can you use with one Itunes account?

    How many iPods can you use/sync with one iTunes account?

    PT wrote:
    Macistotle wrote:
    Unless you have DRM still haunting your tunes ... Then you can only use those songs on 5 devices. Otherwise, connect as many as you like (as stated above).
    No, you can sync your DRM tracks to an unlimited number of iPods (but only authorized to play on 5 different computers/user accounts)
    Patrick
    So I can sync two iPods to my iTunes account and sync the same digital copy movies that come with some o' my DVDs to both ipods? Do movies make a difference really, DRM-Wise? Thanks in advance.

  • Can you use a iTunes card to purchase more storage for iCloud

    can you use a itunes card to purchase more storage for icloud

    No. iTunes Store only.
    "An iTunes Gift Card lets you shop for anything at the iTunes Store "  >  http://store.apple.com/us/browse/home/giftcards/itunes/gallery

  • Can you use soundtrack pro's loops in your youtube videos or do you need to purchase a license since it is royalty free?

    Can you use soundtrack pro's loops in your youtube videos or do you need to purchase a license since it is royalty free?
    I understand they are royalty free, I am just confused about using the actual loops for films, videos, etc - if there is a special license you must purchase or what?
    Yes sure, it's a library and may be used a lot - but is it legal or against agreement?
    And to clarify - what about music I create on the program , that is ok right?

    If you purchased the software you have the right to use the loops that came with the software in the software to make whatever you want.

  • Can you use the Airport Express A1264 as an AP and a DHCP server at the same time?

    Can you use the Airport Express A1264 as an Access Point and a DHCP server at the same time?
    I would like to use it as a DHCP server and AP at the same time in my LAN (no internet, just local machines through a few switches). I was lead to belive this could be the case from a few networking friends that haven't been friendly enough to help me out setting it up.

    I need it to act as a dLink/Cisco/Linksys/etc basic wifi router, in the fact that you can access it via wifi, and it will spit out DHCP addresses (192.168.1.xxx) to everything wired downstream of it.
    I want to simultaniously provide a Wifi connection and a LAN connection at the same time
    Thanks,
    BRad

  • HT204053 Can you use the same Apple ID for two devices ?

    I have an MacPro and I am buying an iPad.  Can you use the same Apple ID for two devices or should I create an new AppleID for the ipad?

    Welcome to Apple Support Communities
    The Apple ID purpose is to have the same data in all your devices and share your purchases among all your devices, so you can use your Apple ID in both devices

  • Can you use FaceTime using two iPads with same apple id

    Have two iPads for wife and I. Both use same apple ID account. Can you use FaceTime between them?

    Heres what you do. got to settings>facetime>add an email and than add another email (note: cannot be the same email that you use on your apple ID) A verifaction email will be sent. Go to your email account and verify the email by clicking on the link. Now using the other ipad, make a facetime call to the email you just verified and you can now facetime between the two!
    One more side note. Make sure that only the email you just verified has a check mark on it. The other ipad shoud have a check mark next to the orginal apple ID email.

  • Can you use 2 Thunderbolt Displays with Windows 7/Bootcamp on a Early 2011 Macbook pro?

    Can you use 2 Thunderbolt Displays with Windows 7/Bootcamp on a Early 2011 Macbook pro?
    I have 2 and cannot seem to get them to work?

    Can you use 2 Thunderbolt Displays with Windows 7/Bootcamp on a Early 2011 Macbook pro?
    I have 2 and cannot seem to get them to work?

Maybe you are looking for

  • Version number in 'About the Application' with Oracle SCM

    We are using Designer 6i with Headstart 6.5. We will be turning on Source Configuration Manager in Designer shortly , but after we go live. Hence we want to set up the P_revision value for displaying version in 'About this Application' form before us

  • Flash Player doesn't work on Mozilla Firefox and IE, on some websites.

    I followed the thread posted by brawlmanjr on this same topic but nothing worked for me. Basically, some videos work prolperly on some websites, but on others, there is a black space where the video is embedded, and there is no link to the video. Sys

  • EPM Addin - Grey Edit Report Issue

    Even after applying KB3025036  fixit for MS office 2010 or 2013, still the problem exists for SAP EPM addin. It is a big show stopper and not allowing for next steps MSoffice 2010 and 2013 - Issue still persists. After installing Microsoft security u

  • DC Communication

    Hi All, I have created two DC's DC A,DC B. In DC A am using DC B. Application is working fine. When i enter any text in DC A that is displayed in DC B. Now i want go back from DC B to DC A for that i created an outbound plug to interface view of DC B

  • Need to upgration of SAP

    Hi, How can i update my SAP Business One. I want to upgrade My SAP. if any update version are available. I have download SAP download manager. i put my SID but the message is appears 'The request fail 403' Please help me. Regards, Mizan