Dynamic Query and default run-time values

I am trying to build a dynamic query within dreamweaver and
retain access from the bindings panel.
here is a simple pseudo-query I want to expand on.
"SELECT object FROM objects_table WHERE widget_number =
widgets"
widgets is set up as a variable with a run-time value that
relates to $_GET['widgets']
this works fine but now i want to expand on this so the query
returns all results if $_GET['widgets'] is undefined. I was hoping
I could set the default value for widgets to equal widget_number so
I would get....
"SELECT object FROM objects_table WHERE widget_number =
widget_number" but the runtime query is actually
"SELECT object FROM objects_table WHERE widget_number =
'widget_number' " which obviously doesn't work.
I can alter the query manually from the code view but then I
lose access to the bindings panel as dreamweaver doesn't parse the
query properly.
Any pointers?
Thanks in advance
- Andrew

Andy Millne wrote:
> That will work fine server-side yeah but dreamweaver
cannot parse the code at
> design time so by altering the code in this way you lose
access to the bindings
> panel and all the server behaviours that depend on the
recordset have
> exclamation marks alongside.
This is simply a question of organizing your workflow. As you
have
discovered, Dreamweaver no longer recognizes a recordset if
you make
changes to the basic structure of the code. The answer is to
use
Dreamweaver to construct your page using an unaltered
recordset. Once
the design stage is complete, make the changes required by
inserting
your conditional statement. Yes, the fieldnames disappear
from the
Bindings panel, and you get exclamation marks in the Server
Behaviors
panel, but that's not important. If you need to restore them
for any
reason, just wrap the changes in /* */ comments. Remove the
comments
when you have finished.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Similar Messages

  • Combining LVOOP DVR with Asynchronous Dynamic Dispatch and Preserve Run-Time Class

    OK, the title sounds like a cornucopia of LVOOP terms.  But there's a reason.  This is in a way an extension of THIS thread.
    What I'm doing recently is creating a LVOOP approach to loading Completely Asynchronous UI elements into subpanels.  This I have combined with a global repository for the objects (which are essentially singletons with a UI functionality) which are shared via DVR, thus eliminating a lot of synchronisation headaches).
    This means that I can ahve a universal framework for launching the UI elements into a subpanel.  The changes made on the Object there are automatically reflected in the global repository.
    So far so good.
    What I don't like too much is a combination of two seemingly awkward code constructs I need in order to keep things running.
    Weird construct 1:
    I have defined a "Launch UI" function in my parent class which is Dynamic Dispatch (Allowing each object to take care of launching its own UI).  This takes a parent object DVR as a second input which I make sure is of the exact same type as the object type being invoked by using the code shown below.  The ACTUAL Type of both inputs to the launch VI within the IPE are identical.  This is guaranteed because I require each new class to override this function.
    Here I pass the DVR from outside the IPE to the "Launch" VI but the Object obtained within the IPE retains information required for DD thus ensuring that the VI called for launching the UI is identical to the ACTUAL object type in the DVR.  This works OK and by placing this weird construct WITHIN the parent class, abuse is minimised, it works fine and seems to have no major side-effects.
    So now we have a VI running asynchronously in the background which belongs to a specific object but has a DVR which it *thinks* is of a Parent Type but, because of the steps taken earlier, is actually of the same type as the object itself.
    In order to make use of the functionality defined in this actual object type, I need to continuously re-interpret the Object within the IPE as shown below.  Otherwise only the Parent functionality is available.
    If I am accessing only methods of the parent class, then the Preserve functionality is not needed.
    Is there a more elegant way to do this?  I find the net result of this code and type-juggling to be really useful and much easier to manage than the non-DVR route since the synchronisation issues disappear.  By making the IPE usage near-atomic we remove the chances of deadlock.
    All editing done in the UI of the asynchronous VI is reflected automatically in any subsequent usage of the DVR.  Even if the DVRs are not shared between VIs, this makes (for me) the headache of synchronisation easier.  If you start expanding this beyond the limits of a single VI, the benefits in Synchronisation become really huge.  You can even have multiple UI objects operating on the same data in the background without extra synchronisation needs.  The only synchronisation required is a global "Data updated" for the object in question whereby the UI elements simply update their indicators and controls from the DVR again.  This is trivial.
    Thus I am convinced that the net result of this is very beneficial.
    My question is if there's a better, safer or more "official" way to do this?
    I was about to start a new Idea for combining the "Preserve Run time Class" and the DVR Terminal of the IPE so that the casting is done automatically.  We could then have a double input to the IPE, the DVR (of base type) plus the ACTUAL Type of the object but of course returning an error if the types are incompatible.  It would be like an "Imposter" DVR input for the IPE which allows a re-interpretation of the object type.
    Would all of this go away if we allowed Dynamic Dispatch to work with DVRs?  Probably.
    Shane
    Say hello to my little friend.
    RFC 2323 FHE-Compliant
    Solved!
    Go to Solution.

    You guys rock!
    I didn't even think of casting the DVR like that.  Kinds stupid of me but I never would have thought it would work.  Cool.
    Also, Yeah, the limitation of no IPE in the Launch VI was one I spotted quite early on.  this is why my Launch VI also doesn't accept more data than is absolutely neccessara because a DVR access in that VI will of course cause a lockup.  I have the system so far now that I can have a SINGLE Launch VI (Which is NOT overridden, so the limitation refers to only a single VI now which is certainly better.
    So again guys, thanks for helping out an old newbie.  I've been around for quite a while, have made many posts but I love the way I just keep learning from others in the Forum.  This is just why I absolutely LOVE it here. 
    Shane.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • Help Please!!! - Unable to read or execute SQL with Next Run Time value.

    Hello,
    We have a requirement where we need to pick the results every five minutes based on the scheduler task "Next Run Time" value. The below is the SQL which was used to run the task every 5 minutes
    SELECT <%RESULTS%>
    FROM
    <%SCHEMA%>.FCI_MAS_CONTACT T1
    RIGHT OUTER JOIN <%SCHEMA%>.FCI_MAS_VENDOR T2
    ON (T2.OBJECTID = T1.PARENT_OBJECT_ID)
    WHERE
    T1.CONTEXTID=<%CONTEXT(masterdata.Contact)%>
    AND T1.INACTIVE=0
    AND T2.INACTIVE=0
    AND T1.CREATED_AT>=
    SELECT
    (ALERT_AT_DATETIME - NUMTODSINTERVAL('5','MINUTE'))
    FROM
    <%SCHEMA%>.FCI_SYS_MANAGED_DAEMON SD,
    <%SCHEMA%>.FCI_SYS_ALERT SA
    WHERE
    SD.INACTIVE = 0
    AND SA.OWNERREF_CLASS_ID = 10502
    AND SA.OWNERREF_OBJECT_ID = SD.OBJECTID
    AND SD.SYSTEM_MANAGED <> 1
    AND SD.CONTEXTID=<%CONTEXT(common.ManagedDaemonType)%>
    AND SD.DISPLAY_NAME = 'Vendor Sync Program'
    OR
    T1.MODIFIED_AT >=
    SELECT
    (ALERT_AT_DATETIME - NUMTODSINTERVAL('5','MINUTE'))
    FROM
    <%SCHEMA%>.FCI_SYS_MANAGED_DAEMON SD,
    <%SCHEMA%>.FCI_SYS_ALERT SA
    WHERE
    SD.INACTIVE = 0
    AND SA.OWNERREF_CLASS_ID = 10502
    AND SA.OWNERREF_OBJECT_ID = SD.OBJECTID
    AND SD.SYSTEM_MANAGED <> 1
    AND SD.CONTEXTID=<%CONTEXT(common.ManagedDaemonType)%>
    AND SD.DISPLAY_NAME = 'Vendor Sync Program'
    While we run the above SQL as scheduler task, we do not see any output. However when we run this as a standalone, we see the results. Please advice if we have missed any step while run the report as schedule task.
    Rgds,
    Vinod

    Hi
    Have you:
    1. Assigned a valid agent to your task - and have you checked that agent found is within the range of valid agents
    2. If you have transported / or is testing on another client, remember that agent assignment must be made on that system as well - and remember - SWU_OBUF.
    3. if this does not help check the authorizations  -  display access to authorization PLOG is required for infotype 1000, 1001 for objecttype AC.
    Regards
    Morten Nielsen

  • How to pass a run time value as a parameter to a webdynpro iview

    Hi,
    we have a webdynpro which we can call with passing a run time value in this form:
    https://xxx.yyy.zzz/sap/bc/webdynpro/sap/zfkq_inv_1?WI_ID=000000004332&sap-client=700&sap-language=EN&sap-wd-sapgui=X
    This link will be sent to many users but the WI_ID will change every time.
    It works fine but now we want to implement this webdynpro in our portal. The user shall get a link like this
    https://xxx.yyy.zzz/irj/portal/webdynpro-test?wi_id=000000004332. With this link he will navigate directly to the webdnypro (quicklink-function).
    The problem is that i don't know how to transfer the parameter WI_ID in the url to the webdynpro.
    It's no problem to fix the WI_ID in the application parameter properties but this is not what we want.
    Is it possible to transfer the url parameter to the application parameters of the webdynpro iview ?
    Thanks in advance.
    Best Regards
    Mirko Berscheidt

    Hi Mirko,
    The first thought I had is if your scenario makes sense at all. Because you might send out the links, but probably the iView will also be accessible via navigation, and in that case this additional parameter won't be there!?! (And if the iView is not accessible by navigation, then why going the way via the portal and not the direct way to the application like with your first link given?!).
    Anyhow, I think this should be possible by using the AppIntegrator, see The customer exit of the Application Integrator
    For an example about how to add individual values to users which you then can add to the URL see this discussion: App Integrator, and custom URL parameters using Customer Exits - this might be a possibility that each user can call the "same" iView but in fact the app integrator then would be fired with different URL parameters (per user).
    Hope it helps
    Detlev

  • List of BO reports failing daily and schedule run time

    Hi,
        Our BO reports are scheduled to refresh daily early mornings 2 - 6 AM and around 280 reports run daily. We want to know list of failed reports daily and measure run time differences for each report in different days and run time for all 280 reports.
    1. List of failed reports (to check if same reports are failing daily)
    2. Total run time for all reports
    3. Change in run for each report on different days.
    Could you please let me know how this kind of report can be generated.
    Regards,
    Nanda Kishore B

    Hello Nanda Kishore,
    Check below two links which can be helpful:
    For query builder, below link has a 4 part series of queries. You can find the other links at the bottom on the page
    BusinessObjects Query builder queries
    If you are using BI 4.x, then below link has a set of sample auditing universe and reports.
    I'm sure you can find the required reports in the attachment:
    Sample Auditing Universe and Reports for SAP BusinessObjects_4_x
    I think auditing would be the best way to get the information required.
    I hope this helps!
    -V

  • References​: Appearance different in Developmen​t System and in Run Time System

    I noticed a difference the references appearance in Development System and in Run Time System.  It seems to have no effect in the executable version but, per curiosity, someone have an explanation?
    Development System
    Run Time System
    Jean-Marc
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp
    Solved!
    Go to Solution.

    tst wrote:
    When LabVIEW builds an executable, it removes the parts which are not needed from the VIs (like BDs, or FPs of VIs which will not be opened). I'm assuming this is an extension of that where the icon is not copied over. Another option is that the RTE is simply missing the code necessary to display this specific this.
    In any case, I would say it's a bug, albeit a minor one.
    I don't think this is a bug, the references refere to a given CTL file, which is not present in the RTE, I think LabVIEW disconnects the reference form the typedef and only saves the properties needed.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Labview 7.0 is compatable with Labview Imaq6.1 , vision builder 6.0 and Imaq run time engine 6.0.

    Sir,
    My system is PXI 8174 and i an using NI 1411 card for my application. I want to know the compatability of the softwares. Whether Labview 7 is compatable with Labview Imaq 6.1 , vision builder 6.0 and Imaq run time engine 6.0.

    Hi,
    Assuming you meant IMAQ Vision 6.1 instead of IMAC 6.1, this software was intended to run on LabVIEW 5.1, 6.0, and 6.1.  I have heard of it being used with LabVIEW 7 on occasion, so it may be possible to make it work, but this has not been tested and is not officially supported.  Vision Builder 6.0 should run; however, it was developed long before LabVIEW 7.x and will not generated code for LabVIEW 7.0 and later.  The Vision RTE version should correspond to the version of Vision you are using.  For instance, if the program was developed with Vision 6.1, the computer should have the Vision 6.1 RTE installed.  With this being said, if you plan to use LabVIEW 7, I recommend updating your other software.
    Regards,
    Ryan M.
    Applications Engineer

  • Run query and get unexpected node values

    Hi,
    I am not seeing what should be expected when I run my query, and I am getting the display of the hierarchy nodes that I am not supposed to get access to. I checked my profile and I have the 0COSTCENTER as '*' and TCTAUTHH as ':' .
    Where should I start finding why I am getting the node values displayed that I am not supposed to?
    Thanks
    Will

    Welcome to SDN.
    I think you should better post it to the BI forum.
    Did you try to use the user exit EXIT_SAPLRRS0_001 (extension RSR00001) to initialize the values? And for bypassing the selection screen, can't you define it in the query definition (if I remember well)?

  • AutosizeHeight and run-time value

    I know this has been asked many times before, but my Google-fu has failed me.
    PowerBuilder 12.5.2 classic mode, running on Win7 64 bit.
    I have an autosize height column in a datawindow, and I want to know how tall it has become after I set a value to it (to account for word/line wrapping, etc.). There is only one row in the datawindow at a time.
    I have tried dw.Describe(ColumnName + ".Height"), and I get the design-time value.
    Tried dw.Describe("Evaluate('" + ColumnName + ".Height', 1)"), get an invalid expression error.
    Used RowHeight(), but it seems to increment sporadically (every 5-12 lines).
    Even put an invisible line under the column with SlideUp, and looked at the Y1 value, but again only get the design time value.
    Help?
    -Kennon

    Aha.
    The RowHeight() expression was the trick, BUT
    I have several autosize columns stacked below the one I'm interested in. They were uninitialized (null actually), and had zero(!) height at run-time. It seems that the row autosize "reserved" enough room for the design-time height, and once a column took up all the phantom allotted space, then the row would resize. Took off autosize on the other columns, and hey presto.
    I am now a bit more bald, but good golly the dang thing works.
    Thank you both for your help.
    -Kennon

  • A dynamic table based on run-time created view object -- please help!

    Hello!
    I'm trying to create a dynamic table based on an run-time created view object. All go ok, but table binding component take the first view/iterator state and don't reflect changes they have. Please, take a look:
    1. At run-time the view is being replaced by new red-only one based on query in application module:
    getQueryView().remove();
    createViewObjectFromQueryStmt("QueryView", statement);
    2. Page definition file contains an iterator (using iterator or methodIterator - doesn't matter) binding and table, which binds to the iterator, like:
    <methodIterator id="distributeQuery1Iter" Binds="distributeQuery1.result"
    DataControl="QueryServiceDataControl" RangeSize="10"/>
    <table id="distributeQuery11" IterBinding="distributeQuery1Iter"/>
    3. The page code uses <af:table>. But, if I use table binding (it's right) like this:
    <af:table var="row" value="#{bindings.distributeQuery11.collectionModel}">
    <af:forEach items="#{bindings.distributeQuery11.attributeDefs}" var="def">
    the table will never changed (i.e. still show the first view instance).
    When I tried to use iterator binding directly (it's bad and cannot provide all needed features unlike CollectionModel from table binding) I saw that table works!
    (Code is somehing like:
    <af:table var="row" value="#{bindings.myIterator.allRowsInRange}">
    <af:forEach items="#{bindings.myIterator.attributeDefs}" var="def">
    Why the table binding do not reflect changes in iterator? Or should I use different approach?
    Thanks in advance!
    Ilya.

    I got it to work! I used a hybrid approach comprised of some of your code and some of Steve Muench's AcceessAppModuleInBackingBean example.
    In the setBindings method, I execute an app module method that redefines the query, then I used your code to delete and recreate bindings and iterator:
    public void setBindingContainer(DCBindingContainer bc) {
    this.bindingContainer = bc;
    rebuildVO();
    The rebuildVO() method looks like the code you provided in your example:
    private void rebuildVO() {
    DCDataControl dc;
    DispatchAppModule dApp;
    DCBindingContainer bc;
    DCIteratorBinding it;
    OperationBinding operationBinding;
    ViewObject vo;
    DCControlBinding cb;
    try {
    bc = getBindingContainer();
    dc = bc.findDataControl(DATACONTROL);
    dApp = (DispatchAppModule)dc.getDataProvider();
    // Execute App Module Method to rebuild VO based upon new SQL Statement.
    dApp.setDispatchViewSQL();
    vo = dApp.findViewObject(DYNAMIC_VIEW_NAME);
    it = bc.findIteratorBinding(DYNAMIC_VO_ITER_NAME);
    it.bindRowSetIterator(vo, true);
    // logger.info("Remove value binding...");
    cb = bc.findCtrlBinding(DYNAMIC_VIEW_NAME);
    cb.getDCIteratorBinding().removeValueBinding(cb);
    bc.removeControlBinding(cb);
    // logger.info("Creating new value binding...");
    FacesCtrlRangeBinding dynamicRangeBinding =
    new FacesCtrlRangeBinding(null,
    bc.findIteratorBinding(DYNAMIC_VO_ITER_NAME), null);
    // logger.info("Add control binding...");
    bc.addControlBinding(DYNAMIC_VIEW_NAME, dynamicRangeBinding);
    } catch (Exception e) {
    e.printStackTrace();
    And my App Module method that redefines the view object looks like this:
    public void setDispatchViewSQL() {
    String SQL =
    "begin ? := PK_BUsiNESS.F_GETDISPATCHVIEWSQL();end;";
    CallableStatement st = null;
    String ViewSQL = null;
    try {
    st = getDBTransaction().createCallableStatement(SQL,
    DBTransaction.DEFAULT);
    * Register the first bind parameter as our return value of type LONGVARCHAR
    st.registerOutParameter(1, OracleTypes.LONGVARCHAR);
    st.execute();
    ViewSQL = ((OracleCallableStatement) st).getString(1);
    findViewObject(DYNAMIC_VO_NAME).remove();
    ViewObject vo = createViewObjectFromQueryStmt(DYNAMIC_VO_NAME, ViewSQL);
    vo.executeQuery();
    } catch (SQLException s) {
    throw new JboException(s);
    } finally {
    try {
    st.close();
    } catch (SQLException s) {
    s.printStackTrace();
    When I run it I get my desired results. One thing I don't quite understand is why when the page is first rendered it shows the last set of records rather than the first. Now I have to figure out how to put navigation URLS in each of the table cells.
    Thanks for your help; I would not have gotten this far without it,
    Jeff

  • cm:select - want to set query param at run time

    Hi,
    I've just started using the personalization server and have a question
    regarding the content manager tag.
    The JSP that runs generates some value that I want to use in the query
    parameter. In the following example, I would like to replace the 02 with a
    dynamic value:
    <cm:select contentHome="com.beasys.commerce.axiom.document.Document"
    query="parentId = '02'" sortBy="ibioObjType ASC" id="objList" />
    So if the JSP had a String variable myVal, essentially, I want to do this
    <cm:select contentHome="com.beasys.commerce.axiom.document.Document"
    query="parentId = '<theValueOfMyValInHere>'" sortBy="ibioObjType ASC"
    id="objList" />
    Any ideas would be gratefully received - thanks in advance,
    Peter Villiers

    Peter -
    Simply use a JSP Scriptlet to generate the query and put it in the tag. For
    example:
    <% String query = "parentId = '" + myVal + "'"; %>
    <cm:select contentHome="com.beasys.commerce.axiom.document.DocumentManager"
    query="<%=query%>" sortBy="ibioObjType ASC"
    id="objList" />
    Just make sure that myVal doesn't contain any single or double quotes, or use
    com.beasys.commerce.util.ExpressionHelper.toStringLiteral() to quote the
    quotes.
    It is also recommended that you use the DocumentManager as the contentHome,
    rather than the Document (see the WLPS 2.0.1sp1 releaste notes on
    http://e-docs.bea.com).
    Hope that helps,
    Greg
    Peter Villiers wrote:
    Hi,
    I've just started using the personalization server and have a question
    regarding the content manager tag.
    The JSP that runs generates some value that I want to use in the query
    parameter. In the following example, I would like to replace the 02 with a
    dynamic value:
    <cm:select contentHome="com.beasys.commerce.axiom.document.Document"
    query="parentId = '02'" sortBy="ibioObjType ASC" id="objList" />
    So if the JSP had a String variable myVal, essentially, I want to do this
    <cm:select contentHome="com.beasys.commerce.axiom.document.Document"
    query="parentId = '<theValueOfMyValInHere>'" sortBy="ibioObjType ASC"
    id="objList" />
    Any ideas would be gratefully received - thanks in advance,
    Peter Villiers[greg.smith.vcf]

  • Dynamic Query and Collect Statement.

    Hi Gurus....
    Please explain me how to write dynamic Query,,, Pl. give me with example.
    Also would like to know basics of Collect statement and it's use..
    Thanks
    Ritesh

    Hi Ritesh,
    COLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab . If all non-numeric fields are same in the internal table then it will add numeric fields and maintains a single entry
    If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields.
    Check this link to know about COLLECT statement
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/collect.htm
    Dynamic query can be built in SAP with the help of () values.
    DATA:
    V_TABNAME TYPE DDO2L-TABNAME,
    V_CONDTION TYPE STRING.
    V_TABNAME = 'MARA'.
    V_CONDTION = 'MATNR LIKE 'S*'.
    SELECT MATNR
      FROM <b>(V_TABNAME)</b>
      INTO TABLE ITAB
    WHERE <b>(V_CONDTION)</b>.
    Thanks,
    Vinay

  • Dynamic query and parameters

    Hi there,
    I have created a procedure and passing values via parameters but then the sql statement takes it as a string rather than parameters. Could you please let me know what it is that I am doing wrong.
    Code is as follows:
    CREATE OR REPLACE FUNCTION GetTableData(p_vInTname IN VARCHAR2
      ,p_dInLastPubTms IN DATE
    RETURN CLOB
    IS
      vStrSqlQuery VARCHAR2(32767);
      TYPE ref_cursor IS REF CURSOR;
      rc_tablevalues ref_cursor;
      lc_XML CLOB;
    BEGIN
      vStrSqlQuery:= q'[SELECT dbms_xmlgen.getxml('SELECT * FROM p_vInTname ' ||' WHERE record_update_tms >= TO_DATE(p_dInLastPubTMS,'MM/DD/YYYY HH24:MI:SS')) FROM dual]';
      DBMS_OUTPUT.put_line(vStrSqlQuery);
      OPEN rc_tablevalues FOR vStrSqlQuery;
      FETCH rc_tablevalues INTO lc_XML;
      CLOSE rc_tablevalues;
      RETURN lc_XML;
      printClob(lc_XML);
    END GetTableData;
    This compiled successfully.
    Another procedure for printing
    Create or replace PROCEDURE printClob (result IN OUT NOCOPY CLOB) IS
        xmlstr   VARCHAR2 (32767);
        line     VARCHAR2 (2000);
      BEGIN
        xmlstr := DBMS_LOB.SUBSTR (result, 32767);
        LOOP
           EXIT WHEN xmlstr IS NULL;
           line := SUBSTR (xmlstr, 1, INSTR (xmlstr, CHR (10)) - 1);
           DBMS_OUTPUT.put_line ('| ' || line);
           xmlstr := SUBSTR (xmlstr, INSTR (xmlstr, CHR (10)) + 1);
        END LOOP;
      END printClob;
    I am trying to test it to see how it behaves, so created a test procedure which is:
    CREATE OR REPLACE PROCEDURE SANDEEP_TEST_LAMXML
    IS
    lv_x CLOB;
    BEGIN
      lv_x := CTN_PUB_CNTL_EXTRACT_PUBLISH.GetTableData('TRKFCG_SBDVSN',TO_DATE('04/27/2015 19:57:10', 'MM/DD/YYYY HH24:MI:SS'));
    END;
    The above one too compiles successfully. However when I set a break point and then try to pass through the function instead of seeing the parameter in the second part of the query, I am seeing it as:
    SELECT dbms_xmlgen.getxml('SELECT * FROM p_vInTname ' ||' WHERE record_update_tms >= TO_DATE(p_dInLastPubTMS,'MM/DD/YYYY HH24:MI:SS')) FROM dual
    What is that I am doing wrong that I am unable to see the runtime parameters being passed into the variables of the query? Can any one suggest something? I am handling dynamic queries and also a solution such as the above for the first time.
    Thanks in advance.

    There are quite a few errors and here's a working version:
    CREATE OR REPLACE FUNCTION GetTableData(p_vInTname IN VARCHAR2
      ,p_dInLastPubTms IN VARCHAR2
    RETURN CLOB
    IS
      vStrSqlQuery VARCHAR2(32767);
      TYPE ref_cursor IS REF CURSOR;
      rc_tablevalues ref_cursor;
      lc_XML CLOB;
    BEGIN 
      vStrSqlQuery:= q'[SELECT dbms_xmlgen.getxml('SELECT * FROM ]'||p_vInTname||q'[ WHERE record_update_tms >= TO_DATE('']'||p_dInLastPubTMS||q'['',''MM/DD/YYYY HH24:MI:SS'')') FROM dual]';
      DBMS_OUTPUT.put_line(vStrSqlQuery);
      OPEN rc_tablevalues FOR vStrSqlQuery;
      FETCH rc_tablevalues INTO lc_XML;
      CLOSE rc_tablevalues;
      printClob(lc_XML);
      RETURN lc_XML;
    END GetTableData;
    CREATE OR REPLACE PROCEDURE SANDEEP_TEST_LAMXML
    IS
    lv_x CLOB;
    BEGIN
      lv_x := GetTableData('TRKFCG_SBDVSN','04/27/2015 19:57:10');
    END;
    This version will be easier to understand:
    CREATE OR REPLACE FUNCTION GetTableData(p_vInTname IN VARCHAR2 
      ,p_dInLastPubTms IN VARCHAR2 
    RETURN CLOB 
    IS 
      vStrSqlQuery VARCHAR2(32767); 
      TYPE ref_cursor IS REF CURSOR; 
      rc_tablevalues ref_cursor; 
      lc_XML CLOB; 
    BEGIN  
      vStrSqlQuery:= 'SELECT * FROM '||p_vInTname||' WHERE record_update_tms >= TO_DATE('''||p_dInLastPubTMS||''',''MM/DD/YYYY HH24:MI:SS'')';
      DBMS_OUTPUT.put_line(vStrSqlQuery); 
    SELECT dbms_xmlgen.getxml(vStrSqlQuery)
      INTO lc_XML
      FROM dual;
      printClob(lc_XML); 
      RETURN lc_XML; 
    END GetTableData; 

  • Error involving Report Generation Toolkit and Labview Run Time Engine

    Developed an application using LabVIEW 6.1 and LabVIEW Report Generation Toolkit for Microsoft Office 1.0.1. From there, tried to build a shared application for use with the LabVIEW Run Time Engine. The Run Time version functions properly until "New Report.vi" is called and then an error is generated, code 7, calling out "Open VI Reference in New Report.vi" could not be found. When building the application, I did include the "NI Reports Support" in the advanced installer options. The machine used for original development and application build is running Windows XP Pro and Office XP. Any suggestions??

    I am having the exact same problem but with LV 6.1 and M/S WORD 2000. It appears that the "New Report.vi" is trying to open "C:\APP.DIR\Word_Open.vi" and "C:\APP.Dir\Word_Open_Document.vi" by reference. The "OFFICE 2000.TXT" says that "_exclsub.llb and _wordsub.llb must be added as support files when building an application or a dynamic link library with the application builder." I added them as Support Files and I copied them to the "C:\TESTER\" where the TESTER.EXE is and I still get ERROR 7 in "NEW REPORT.VI" at VI OPEN REFERENCE.
    Do I need to make a "C:\TESTER\DATA\" sub-dir and put the support files there?
    I am building on MY COMPUTER on F: Drive on a network and transporting files to the real Tester.
    I displayed my App.Property of APP.DI
    R at start up and it is C:\TESTER\ ! How would my application know that "Word_Open.vi" and "Word_Open_Document.vi" are actually inside the _wordsub.llb?
    Any ideas ?
    Greg Klocek

  • VISA Write differs between TS Development System and LV Run-Time Engine

    Hi all
    I made an application on LabVIEW to test BERs (Bit Error Rates), and I used VISA Write between two COM ports to exchange data.
    Everything works fine using just LabVIEW.
    Afterwards, I used TestStand to call my application (VI). The LabVIEW adapters from TestStand were set to Development System by default, and everything works OK!!
    Finally, I needed to disable the development system, and set the LabVIEW adapters from TestStand to LabVIEW Run-Time Engine and I notice that the speed of the data exchange between the two COM ports decreased dramatically.
    The only difference was the speed...because all the data (changed slowly in this case) arrived correctly on the other COM port too.
    The symptom was the same as decreasing the baud rate...but the baud rate and all the other configurations remained the same. The only difference was the change between Develpment System to Run-Time Engine to notice this decreased speed between the exchanged data using VISA Write.
    Any solutions for this?
    Thanks in advance
    Joao
    Solved!
    Go to Solution.

    Joao,
    you state that using the LV Developement System as execution platform for your LV code modules result in faster datatransfer between the COM ports than using the LV Run-Time Engine.
    So i am pondering: Does this refer to TS at all?
    Please check the following:
    Run you communication using a sole LV application in LV Developement System. This should be fast. Now build an executable of this application and run that one. Do you see the same behavior?
    If there is no difference in a sole LV approach, there have to be some settings in the TS approach making this slow. So please let us know:
    Are there different modules involved in that data transfer (which in fact points to the reply Christophe made)?
    What about loading/unloading options of the modules?
    How big is the hierarchy of the modules, e.g. is it necessary for the RTE to load stuff the Dev Env has already in memory due to loading a lvproj.......?
    Could you provide a simple example sequence+modules showing this behavior?
    What versions of LV and TS are you using?
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

Maybe you are looking for