Use of xquey function library

i have made an xquery function library which incorporates the add_month function of sql.
add_months($date as xs:dateTime,$value as xs:int) as xs:dateTime?
But while using this function in a let clause in xquery:
let $nextMonth:= ns1:add_months(fn:current-dateTime(),xs:int("1")) i am geting this error;
add_months": unbound external function. Improper use of the user-defined SQL function .

It's "improper" as none of the arguments come from that database, therefore ALDSP will not push it to the database.
This computation can be done in XQuery - what you want to do is to add a YearMonth style 'duration' to the date.
If you go to w3.org, click on Xml Query, click on the 'Functions and Operators' link, then look for in section 10.8.4. Notice this is an 'op' - an operator. It is not a function and you cannot call it directly. Notice the last line in the description - it says it 'backs up the + operator' - so that's how you use it - by using the + operator.
So -
A YearMonth duration of 0 years 1 month is
xs:yearMonthDuration("P0Y1M")
so what you want is :
fn:current-dateTime() + xs:yearMonthDuration("P0Y1M")
If you had a genuine need to call a database function with arguments that did not come from that database, you could do so by creating a New -> Physical Data Service -> Relational -> SQL Statement.

Similar Messages

  • With using any version of iTunes, whenever I import songs into my library using the "add to library" function, iTunes adds those songs in songs' alphabetical order. This is pretty annoying since it does not preserve the logical track number or album.

    With using any version of iTunes, whenever I import songs into my library using the "add to library" function, iTunes adds those songs in songs' alphabetical order. This is pretty annoying since it does not preserve the logical track number or even the album sort order (for example when adding 2 albums stored in a unique folder). Anyone has any ideas ? Been stumped for a while....!!!

    hi i had the same problem today when i updated my itunes to latest version. however, i have just found my songs in the 'itunes media' folder. this was accessed through 'my music'  then keep clicking through until you find itunes media and all my library songs were in there and i then just added these files to my library and all were restored however, i have lost all my playlists but at least my 700 songs are back. very dissapointed with apple that they have let this happen with their latest update, the previous version was miles better than this one . hope you find them. stevo

  • How to use the CMS functionality in Sun Portal Server 7.2

    Hi All,
    How to use the CMS functionality using the ccd.war(Portlet) which is available in the library as i could add it to my channel but not able to show the functionality as it is showing the error msg "You are currently not logged in. Please login." should I create userid and there respective roles inorder to use the CMS functionality.
    Has any one used this as I could this in glass fish server.
    Any Input is appreciated.
    Thanks & regards
    Srikanth

    Have a look at the "*Roles*" section of the portal server 7.2 content management system guide
    http://docs.sun.com/source/820-4275/index.html . You can also look at [project mirage|https://mirage.dev.java.net] for some screencasts
    Alternatively,
    1. ccd.war has 3 portlets in it:
    (a) custom content definition portlet
    (b) custom content portlet
    (c) workflow portlet
    2. Inorder to work with these portlets, user needs to be in anyone of the below roles:
    (a)Consumer (b) Editor (c) Approver (d) Administrator (e) Submitter (f) Contributor (g) Publisher
    3. By default ccd.war gets deployed using a default roles file (/var/opt/SUNWportal/tmp/ccd.roles.properties)
    Note: In windows, you may not find this file
    4. Access the portlets as a user in any of the role mentioned in the ccd.roles.properties
    (OR)
    you can use a new roles file which has mapping to your custom roles. For this , undeploy existing ccd.war and deploy again with a new roles.properties file
    Hope this helps!

  • Scanning in Mavericks? I can no longer use the scanning function in my HP Officejet 4500. HP says to go through Preview, Image Capture, or Print/Scan in System Prefs. Still doesn't work. Any ideas/similar experiences?

    Scanning in Mavericks? I can no longer use the scanning function in my HP Officejet 4500.
    HP says to go through Preview, Image Capture, or Print/Scan in System Prefs.
    Still doesn't work. Any ideas/similar experiences?

    Sure it is, yet it's called HP LaserJet Professional M1210nf MFP Series *
    Today, I followed your other advice, and deleted the printer, deleted the /Library/Printer/hp folder, downloaded the entire set of driver, re-installed the printer twice, once with the driver, once with Bonjour.
    The Bonjour Printer has the scan option active, but it is doesn't work (refer to above.), it is called M1217nfw
    The Apple Driver Printer doesn't show the scan option at all, it is called M1217nf (as on the http://support.apple.com/kb/HT3669#HP list.) This model number doesn't exist, as far as I can tell. 
    Still, everything works perfectly in Snow Leopard, for a MF printer that has been manufactured years after Snow Leopard was released.
    Why going up in software version means going backwards in compatiblity for brand new product is really the question that puzzles me here.

  • How to make use of SE37- Function Module & how to find out the table?

    Hi ,
    1.Could anyone help me what's this SE37-Function module is all about,How to make use of this?
    For Eg,If i want to delete a BOM permanently from the system then I have to use the Function module CM_DB_DEL_FROM_ROOT_BOM.
    But after giving the particular name what should i do?
    Please help me.
    2.How to find out the respective table for a particular field sya for T code-COGI, T code MFBF,where its values are getting populated.,Please help in this issue.
    Thanks in adavnce for spending some time
    Raj.S

    Hi Raj
    Function Modules
    Function modules are procedures that are defined in special ABAP programs only, so-called function groups, but can be called from all ABAP programs. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.
    Function modules allow you to encapsulate and reuse global functions in the SAP System. They are managed in a central function library. The SAP System contains several predefined functions modules that can be called from any ABAP program. Function modules also play an important role during updating  and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.
    Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the Function Builder.
    The Function Builder  also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed.
    Check this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    You can execute function module in SE37ie you can perform the activiites defined in the function module by executing it.
    By deleting BOM you mention the FM name in se37 and execute. In some function module it will ask input parameters as developed in the program , you have to give the input parameters and execute.

  • Is there any downside to using a reference type library if I use Time Capsule and will do file management only from within Aperture?

    Have done a lot of reading to get prepared to convert to Aperture 3 and have this question regarding setting up my library type.
    I'm not a professional -just a heavy user hobbyist.
    It appears that the major factors in using reference style is to backup the images with Time Capsule and always do moves or deletes from within the Aperture application.
    If my architecture matters here's what I have that may be involved in photo management and editing:
    iMac (latest 27" high power version with lots of memory)
    Internal 2TB HD where the library is stored
    External (FireWire) 2TB HD where the images are stored
    External (FireWire) 6TB HD backup drive
    In the future an iPad for remote work on images (when/if available) and a Mac laptop (for same remote use)
    I see major downside issues to letting the library manage my files - such as inaccessibility (or awkward accessibility) to the images for other programs, and performance issues when the library gets large (thousands of images or 100+ gb in size)
    The chief complaints I've seen regarding using a reference mode is the broken link issues created if file management is done outside of Aperture (adds, deletes, moves of files) and the inability to use the Vault function for backup.
    One feature that I imagine I'd like to have is maximum integration with Final Cut Pro X and that's one area I haven't seen much on and would be interested to hear about if that integration is affected with the choice of managed vs referenced library types. (I like to produce film clips that are combinations of pics and video and want to be set up so that is done in the easiest fashion when working in FCP X)
    I'm sure I've not seen all sides of this issue and would like to see some discussion around this question.
    Thanks to everyone contributing!
    Craig

    Goody, Goody, you hit a few of my favorite subjects! Herewith some comments, with the usual caveats - true to the best of my knowledge and experience, others may have different results, YMMV, and I could be wrong.
    I run Aperture on two machines:
    -- 2007 Mac Pro with 2x2.66 GHz Xeon, 21 GB of RAM, a 5770 GPU, and multiple HD. I have about 11,000 images, taking up 150 GB. (Many are 100 MB TIFF, scanned slides)
    -- 2006 Mac Book Pro with 1 2.0 GHz Core Duo, 2 GB of RAM and a 240 GB SSD.
    Two very different machines.
    -- Aperture Libraries are all the same - Managed or Referenced. If Managed, then the Master image files are inside the Package, if Referenced, they are outside, and you can have any combination you want. Managed is easier, but Referenced is not hard if you are the least bit careful.
    -- While the sheer size of an Aperture Library is not a big issue, the location on disk of the different components can have a tremendous impact on performance.
    -- Solid State Drives (SSD) read and write faster than regular Hard Disks (HD) and, what is more important, empty HD read and write much faster than full HD.
    -- Aperture speed requires a combination of RAM, CPU, graphics processing unit (GPU) speed, and disk speed. The more RAM you have, the less paging you will see. With enough RAM, the next bottle neck is CPU (speed and cores) and GPU speed. But even then you will still have to fetch an image (longer if you pull the full resolution Master, read and rewrite the Version file, and update the Preview and Thumbs.
    So what works?
    -- RAM, RAM, and more RAM. 4 GB will work, but you will page a bit. 8 GB is much faster. On my old MacPro the sweet spot was about 16 GB of RAM.
    -- Keep your Library on your fastest (usually internal) drive. Keep that disk as unloaded as possible. How do you keep it unloaded? Either buy BIG, 1 TB+ or move your Masters off onto another disk. The good news here is that as Master files are written only once and never rewritten, speed of this disk, as opposed to the disk that holds the Library, is not important. There is a one second pause as the Master is read into memory and, if you have enough RAM, that is it - the Master will never be paged out. If, on the other hand, you do not have enough RAM, and you do a lot of adjusting at full resolution, then the speed of the disk that holds your Masters will become very important due to paging.
    -- I found that I picked up a tiny bit of speed by keeping the Masters on a dedicated disk. Thus, in your configuration, if you can dedicate that 2 TB FW HD to your Masters, you should see very nice performance.
    Final notes on backups and archives:
    -- One conventional wisdom is that you should make an archive copy of every image file before or as you load them into your system. (Aperture in this case.) This archive is then never touched or deleted.
    -- An alternative approach is that you do not keep such an archive, but only the images that you have in your Aperture Library. And when you delete from the Library, you no longer keep a copy anywhere.
    I do the following:
    -- Card to Aperture. Card is then kept at least 24 hours until all of my backups have run. (I use three - Time Machine, Clone, and off site.)
    -- I do not keep archive copies. If I decide to delete a file, my only recourse is to recover it from Time Machine during the six month cycle of my Time Machine backups. Thereafter, it is lost.
    There are merits to both approaches.
    Hope this is clear, correct, and responsive to your needs.
    DiploStrat

  • How do I determine what iphoto is trying to use as the current library?

    I had an issue earlier tonight when i accidentally yanked the USB cable out of the external hard drive which held the current library while importing in to iPhoto. This, of course, made a bit of a mess, but now it seems that iPhoto is using some other library, which I can't find, and so I can't rename it to allow me to change to the old library.
    Is there a way that I can just force iphoto to allow me to find the proper libary? Or find what it's currently using and change it?

    Welcome to the Apple Discussions.
    Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Choose Library' and point it at the Library on the external. If iPhoto sees an undamaged library there it will open it.
    If it doesn't see one:
    Try these in order - from best option on down...
    1. Do you have an up-to-date back up? If so, try copy the library6.iphoto file from the back up to the iPhoto Library (Right Click -> Show Package Contents) allowing it to overwrite the damaged file.
    2. Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    3. If neither of these work then you'll need to create and populate a new library.
    To create and populate a new library:
    Note this will give you a working library with the same Events and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.
    In the iPhoto Preferences -> Events Uncheck the box at 'Imported Items from the Finder'
    Move the iPhoto Library to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library (Right Click -> Show Package Contents) on your desktop and find the Originals folder. From the Originals folder drag the individual Event Folders to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.
    To find that "hidden" library:
    Go to The Finder -> Go Menu -> Go To Folder and type /Volumes into the address box.
    Regards
    TD

  • JNI - how to use java access function in TypeLibrary( .tlb file) HELP ME PL

    Hey All
    I got one project which can be done by calling up functions in xxxx.tlb
    (window type library) file, that is no problem.
    How to use java to access those functions???
    I know there are some classes which can be used to access function in
    DLL file e.g. JAWIN.
    Is the .tlb file related to one DLL file??? if so, how to locate the
    DLL file through .tlb file???
    Thanks a lot.
    Steve

    Use JNI to create a link between Java class and a DLL, then you can load that DLL (or TLB) from that class.
    Read the JNI Tutorials.

  • PI 7.1 function library

    Dear All,
    We are working on PI 7.1 EHP1, we have implemeted the functionality of Function Library having common place for UDFs. We have seperate SWCV for this.
    We are using these UDFs in other SWCV's mapping and working well in DEvelopement Server.
    When we have transported this to Production Server, it is giving following error.
    "Linkage error while loading class com/sap/xi/tf/_Invoic02_InvoiceDataService_MM_; java.lang.NoClassDefFoundError: Extend/GeneralUDFs"
    Here, Extend is the name of the SWCV and GeneralUDFs is the name of Function Library.
    Please help
    with regards,
    Ravi Siddam

    We have seperate SWCV for this.
    We are using these UDFs in other SWCV's mapping and working well in DEvelopement Server.
    Working in DEV because you would have created Dependencies between the SWCVs....is the same thing (dependency) available in PROD.
    Regards,
    Abhishek.

  • Function library in PI 7.1 - retrieval of filename

    Hi,
    I am trying to use the function library functionality in PI 7.1 but struggling a bit.
    Basically, I want a function for the retrieval of the filename - pretty easy in goold old UDF days but not so easy now everything has moved to the function library world in PI 7.1
    I have defined the following code in the "init"  Function and Java Areas:
    DynamicConfiguration conf = (DynamicConfiguration) container.getParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    //For getting filename
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    //For getting directory
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
    // Retrieve the filename
    String FileName = conf.get(key1);
    // Retrieve the directory
    String Directory = conf.get(key2);
    This is working ok - but I want to return these values so they can be used in mapping.
    when I try to add the statement return FileName; , the compiler then complains with the following error:
    cannot return a value from method whose result type is void return FileName;
    But where do you define the result type for a method ????? I guess it has something to do with the signature variables but I am a bit lost.
    Any help greatly appreciated.
    Thanks
    Colin.

    Hi
    Function type Void is not going to return value. It has be String type to return value. Check the function again
    Also this documents provides good info on mapping in PI 7.1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f06d11f2-e7c2-2a10-04a9-f2f6f374cd29
    Thanks
    Gaurav

  • How can i set songs within a playlist, or an entire playlist, so that they are not included when using the shuffle function on IPOD Classic? Is this possible?

    How can i set songs within a playlist, or an entire playlist, so that they are not included when using the shuffle function on IPOD Classic?
    Is this possible?

    You can set any song to Skip when shuffling.
    In your iTunes Library, highlight the song and right-click/Get Info. On the Options tab is the Skip when shuffling box. Select that and then Sync the iPod with your Library.

  • Unable to edit Function Library

    Hi all,
    I am unable to edit a function library I created. I always get a NullPointerException:
    There is no syntax error in the included functions. The Library is activated, but it is also not found by the runtime. When I send a test message I get an error that the used functions were not found.
    I have already tried to create another function library. I am able to create and activate it, but get the same error when I try to edit it.
    I am working on a Java single-stack.
    Any suggestions?

    I already tried this.
    But the main problem ist: When I am in ESR in the function library and klick the Edit-Button, I get the error message shown above. So I am not able to edit any function library.
    What could be the problem? I already tried:
    - To remove all special characters from the name and description of the function library
    - To create a new namespace with a new function library

  • Using advanced math functions in plugins

    I have an application built in LabVIEW 8.5 that calls external VIs as PlugIns. Normally adding any subVIs of these PlugIns in the same directory as the plugin is located in (or a sub-directory of that) will enable the plugin to execute (I have several such plugins that do run properly).
    The problem now however is that one of these PlugIns use a few math functions (linear fit etc.) and, although all the subVIs and dlls (including the ones from the vi.lib etc.) are located in the same directory - and the application is run on a machine that actually has the full professional LV 8.5 installed on it, it is still not executable (I've built a source distribution to get all the code it depends on out, with no exclusions). If I hit the broken run-button it says the full development system is required to resolve the issue.
    The same plugin works fine in LV 7.1.1 (although then it is distributed as a top level VI in an llb with the support-VIs in it instead).
    Is there still a way in LV 8.5 to distribute a plugin that uses the math functions without having to include the functions in the built application that will launch the plugin?
    MTO

    Hi, Mads,
    My "Quick and Dirty" test shows that it should be no any problems. Just deselect "Exclude vi.lib" Vis in the Distribution, and select that dependecies should be deployed with PlugIn. See attachment, hopefully its will be helpful for you. Such distribution way produced huge llb (because not only linear fit embedded into library, but all math library), but at least it works.
    best regards,
    Andrey.
    Attachments:
    PlugInWithMathDistributionTest.zip ‏21 KB

  • Configuring Encoders Counts per Revolution using a flexmotion function

    Hello,
    I am having a problem configuring a connected encoder in labview using the flexmotion function.
    The setting:
    I am building a labview vi I want to run on a computer with the connected hardware. But I may NOT have access to the machine to configure it with the "Measurement and Automation Explorer". The hardware may vary too, thus I have to detect and then configure it. I want my VI to set all necessary parameters before I start moving the hardware. I am pretty much done with this.
    The problem:
    I cannot find a way to configure the 'Encoder Counts per Revolution' as shown in picture 2. There is no function in the Motion menu as shown in picture 1. There does not seem to be a function in the FlexMotion32 library (shown in picture 3) to do this either.
    I read through the FlexMotion Software Reference Manual (http://www.ni.com/pdf/manuals/321943b.pdf) and tried to find an answer in multiple forums but was unsuccessful.
    The question:
    Does anyone have an idea about a function in the FlexMotion32.dll that I could not find? Or any other way to configure the encoders within LabView?
    I appreciate any ideas and thank you for taking your time reading this.
    Best,
    Frank.
    Attachments:
    Motion config 1.JPG ‏31 KB
    Motion config 2.JPG ‏75 KB
    Motion config 3.JPG ‏86 KB

    See attachment.
    Attachments:
    Encoder Counts.JPG ‏71 KB

  • Use of Call Function Node vi, with char type pointer

    I want to be able to use a certain function from C++ DLL, and I followed the TOOLS>>IMPORT>>SHARED LIBRARY(.dll) wizard.  Where I located my header file and the dll file.
    However i am getting an error (1097).  This is the function with the paramaters:
    void Function_Name(unsigned char *L, unsigned char *H, unsigned in Len, unsigned char Adr);
    I don't think, that I configured my Call Function Node, correctly.  How should i set the paramaters settings of the first 2?  I have tried Numeric, unsigned (and signed) Int (32, 16), pass pointer value.  to accomodate the first two varaibles. 
    Please someone help, what should I do to accomodate the unsigned char pointers, so that I can used the function in labVIEW?

    Hi Safe,
    The error you're encountering has the following description (I'm sure you've already looked this up-posting here for clarity for other readers):
    LabVIEW:  An exception occurred within the external code called by a Call Library Function Node. This might have corrupted LabVIEW's memory. Save any work to a new location and restart LabVIEW.
    Typically, this happens for one of just a few reasons:
    Memory was overwritten (e.g. you passed a buffer of N bytes, but N+X bytes were modified, and an exception was thrown.
    A bad pointer was passed. (This is probably not the case.)
    Arguments were not passed to the function properly. (Calling conventions)
    Function wasn't called from the proper thread.
    Some other reason (only can be determined by inspecting in a debugger).
    I've attached some pictures of how I'd configure the dialog, but there are two critical things you have to know: calling conventions and thread safety. Those are things defined by the DLL. In Windows, C vs. 'Standard' (a.k.a. Pascal) calling conventions MUST be correct, as they affect how arguments are passed on the stack. If this is wrong, then, for example, where arg1 is expected to be an unsigned char *, you may actually only pass an unsigned char. Dereferencing that number as a pointer will at best crash, at worst appear to be a valid address and silently corrupt memory.
    I suggest double-checking the calling conventions. 'stdcall' is still quite common, but not the default setting in the Call Library Function dialog.
    Best regards,
    intvstefve
    intvsteve
    LabVIEW R&D
    Attachments:
    dllconfig11.JPG ‏40 KB
    dllconfig21.JPG ‏41 KB

Maybe you are looking for