Parameter transmission problem

Hello! I have the following two classes:
public class VeterinaryReport
int dogs;
int cats;
String name = new String();
public int GetAnimalsNo()
return dogs + cats;
public void DisplayStatistics()
System.out.println("Total number of animals is "+ GetAnimalsNo() + ".");
System.out.println("The owner of the animals is "+ name + ".");
return;
import java.io.Console;
class VeterinaryTest
        public static void SetName(String name)
         Console cons;
      if ((cons = System.console()) == null)
      System.err.println("No console.");
      System.exit(1);
      String login = cons.readLine("Enter name for veterinary: ");
         name = login;
         return;
        public static void main(String[] args)
           VeterinaryReport vr = new VeterinaryReport();
           vr.cats = 20;
           vr.dogs = 40;
           SetName(vr.name);
           vr.DisplayStatistics();
           return;
}, and the problem is no names are displayed at the call of DisplayStatistics, like this: "The owner of the animals is ."
Inside the function, everything works, so I guess it's something of parameter transmission that I don't know about.
can anyone see what goes wrong?
Cheers

The problem is that the SetName method is in the VetTest class and not the VetReport class. There is absolutely no connection between the name variable in the SetName method and the VetReport class. So that means that whatever changes you make to the name variable in SetName has no effect on name in VetReport. When you print out the data name in VetReport is still an empty string and that is what you see on the screen: nothing.

Similar Messages

  • W3d with transparent textures will be broken transmission problems

    W3d with transparent textures will be broken transmission
    problems
    When the W3D models have Texture with alpha channel, It will
    be Crusher and Transmittance (Showing the bottom), If not alpha it
    will be normal! please tell me why,Thanks
    snap:
    have alpha channel:
    snap-alpha.JPG
    no alpha channel(normal):
    snap-no-alpha.JPG
    3d model Source file & W3D file:
    http://www.3dzone.cn/beijixiong.zip
    <---new

    As we have written you can get it to work. Just do one of the
    following.
    1. Make the model a complete mesh. no parts just stuck into
    others. Make sure vertecies are welded together properly etc.
    2. a) Separate the head,hat,hands etc b) group them together
    c) export (the exporter will combine them into one model again).
    3. a) Assign a non transparent texture to your model, b)
    select the polygons that needs transparency, c) assign the
    transparent texture to those polygons
    4. Outsource the importing of models to someone else.
    I used method 2 as I mentioned in an earlier post and got it
    to work, here is the result.
    Scarecrow
    with transparency working
    The url to report bugs to adobe was recently posted, use the
    search function.

  • Report 9i parameter form problem, is it a bug?

    Hi all,
    I am using Dev 9i IDS, rel. 9.0.2, running in windows 2000. I've been converting my forms and reports from previous versions to 9i, and I came across an issue with the report's parameter form.
    First, I thought it could be a problem during the conversion , but to make sure I developed a new form and a new report straight in the 9i IDS suite, using Scott's DEPT table. The new form is simple having a button to call the new report which is based on the DEPT table and accepts an user's input for a dept. no.
    The same problem occurs:
    - in the form, if I set PARAMFORM=HTML then it could not open the report parameter form, hence the report could not run.
    - if I set PARAMFORM=YES, then the report parameter form is displayed, then I can enter a value for the department number. BUT, when I clicked the Submit Query button the report failed, and I received the following error:
    REP-52007: Parameter form format error.
    java.lang.IllegalStateException: Response is already committed!
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse.setContentType(EvermindHttpServletResponse.java:973)
         at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:27)
         at oracle.reports.rwclient.RWReportRunner.setContentType(RWReportRunner.java:261)
         at oracle.reports.rwclient.RWReportRunner.getMainFile(RWReportRunner.java:135)
         at oracle.reports.rwclient.CommandManager.handleCmdGetjob(CommandManager.java:1219)
         at oracle.reports.rwclient.CommandManager.handleWebCommand(CommandManager.java:369)
         at oracle.reports.rwclient.RWClient.handleWebCommand(RWClient.java:651)
         at oracle.reports.rwclient.RWClient.processRequest(RWClient.java:1053)
         at oracle.reports.rwclient.RWClient.doPost(RWClient.java:318)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:283)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:59)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:523)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
         at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    I have no problem integrating others reports that don't have parameter form using run_report_object. And, I've checked and tried different ways of manipulating the parameter value using to_number in the report's where clause etc., it never worked.
    I guess the only workaround is to create the parameter form in Forms builder. Is there other ways of doing it , or is it a bug of the 9i IDS suites that needs to be fixed?
    - Thanks

    Hi Frank,
    There's a note published on Metalink, note 139546.1, showing a workaround to thi problem. but
    - it is rather lengthy and confusing, may not be practical .
    - it only applies to Forms and Reports 6i.
    However, it shows that the problem comes from 2 items in the source code of the parameter form which is produced by the RUN_REPORT_OBJECT built-in:
    1. <form method=post action=""> where action contains an empty string, it needs to have a valid entry, e.g.
    <form method=post action="http://hostname:port/cgi/rwci60.exe?">
    2. <input name="hidden_run_parameters" type=hidden value=""> where hidden value is also empty. It should contains all parameter values passed to the report parameter form, e.g.
    <input name="hidden_run_parameters" type=hidden value="report%3test+destype%3Dcache+userid%Dscott.....">
    And that is what I found, but I am reluctant to try it in 9i IDS, hoping Oracle has a better solution than that.
    Tho.

  • SAP BW and Crystal Reports XI R2 Parameter list problem??

    Hello Experts,
    I facing a problem.
    I have a crystal report based on a BW Query. It has one parameter called Country.
    Eg:
    Until now, in BW query country variable has the following values.
    USA
    JAPAN
    GERMANY
    Now, from this fiscal year we have the following values for country variable
    USA
    JAPAN
    INDIA
    GERMANY
    UK
    I am trying to edit the list of values for the country variable in crystal reports. It is not getting reflected in SAP BW. I also tried refreshing it several times.
    THE VARIABLE IS A HIERARCHY VARIABLE.
    Can any one Please help.!!
    Regards
    NMU
    Edited by: Mohammad Usama on Oct 20, 2008 4:26 PM

    You said that you are using version XI R2 SP2 (for BO Enterprise)  - do you have any FixPacks on this codeline? (FP2.x)
    Question: If YES to above, have you made use of the equivalent FixPack for Integration Kit?  (known as "Partners Fix Pack 2.x ")
    There are a few fixes in this area, I was thinking like:
    ADAPT00716808 -  When scheduling a report from SAP Business Information Warehouse (BW) that contains parameters from a hierarchy or a hierarchy node variable, the default values fail to be displayed from InfoView. >>
    ADAPT00894127 -  When users enter date parameters in the Calendar dialog box in SAP InfoView, the dates entered fail to appear in the corresponding field.
    Good luck,
    Henry

  • XDK 9.0.2.0.C XSQL parameter visibility problem

    Dear Steven,
    I consider this as a serious bug:
    When one set XSQL page or XSQL session page parameter it
    become visible in page/request/session or otherwise only after
    the following round trip to the client.
    In other words, it is not present in the incoming XML to xslt to
    process.
    Thank you,
    David

    David,
    I just re-tested with 9.0.2C and things are working as they
    should. For example, the following XSQL page:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="test.xsl"?>
    <page xmlns:xsql="urn:oracle-xsql" connection="demo">
      <xsql:set-page-param name="page-param" value="1"/>
      <xsql:set-session-param name="sess-param" value="2"/>
      <xsql:set-stylesheet-param name="sheet-param" value="3"/>
      <xsql:include-param name="page-param"/>
      <xsql:include-param name="sess-param"/>
    </page>referencing the following stylesheet:
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:param name="sheet-param"/>
      <xsl:template match="/">
        <html><body>
        <b><xsl:value-of select="$sheet-param"/></b>
        <b><xsl:value-of select="/page/sess-param"/></b>
        <b><xsl:value-of select="/page/page-param"/></b>
        </body></html>
      </xsl:template>
    </xsl:stylesheet>shows an HTML page with the expected "321" the first request.
    If you are talking about cookies, then you are correct that the
    cookies you set this request are not visible until the next
    request (which is the standard way cookies work), however, you
    can use the new XSQL 9.0.2C feature to "see" the cookie value
    immediately by adding the immediate="yes"] attribute to
    your <xsql:set-cookie> action.
    If I've misunderstood your problem, please post a testcase that
    illustrates the issue. Thanks.

  • Parameter form problems w/reports server

    I'm in the process of trying to make some reports from a forms-
    based application available on an intranet via reports server.
    If I call the reports without a parameter form (just take the
    default parameter values) they work fine, but as soon as I put
    in a 'Paramform=YES' I start running into problems.
    The entries in cgicmd.dat are in this form:
    reptname: server=servername report=reptname.rdf
    userid=user/pw@db_name destype=cache desformat=PDF paramform=YES
    When I submit the parameter form, no matter what set of values,
    I get this error:
    Oracle Reports Server CGI - Key "" is unrecognized. Possible
    causes: bad URL syntax; key in URL was not found in the key map
    file.
    Also, on some forms that should have drop-down list boxes, it's
    instead displaying a blank text field followed by a long string
    of values as plain text below it.

    hello,
    sounds like an issue we had in the early versions of 6i. i would suggest you upgrade to the latest patch.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                               

  • Sql parameter substitution problems

    Hi,
    I am having problems with the sql parameter substitution. I have a query that
    looks like this:
    select name,value from table where name in ('name1','name2');
    I have tried building a string that equals "'name1','name2'" and passing it as
    a parameter to sql entering the javaDoc comments like:
    select name,value from table where name in ({nameString})
    The problem is that when it is substituted and set to the database it looks like
    this:
    select name,value from table where name in ('\'name1\',\'name2\'');
    This will not work. Does anyone have any suggestions on how to do this using a
    database control. Basically I'm looking for the ability to create dynamic sql
    statements.
    Thanks for your help.
    Regards,
    James

    Anurag,
    Thanks for the reply. I don't think that this solves my problem though. I will
    never know how many strings to pass. It's all based on what the user wants, they
    could ask for 2, 20, or any other number of names. It sounds like using a Database
    control is not really possible for this situation. What do you think? Any chance
    of this making into workshop in the future or in these situations is creating
    an EJB the only way to go?
    Thanks again.
    Regards,
    James Chamberlain
    "Anurag Pareek" <[email protected]> wrote:
    Hi James,
    This result is same as what you will get on executing the following prepared
    statement:
    conn.prepareStatement("select empid from empdemo where name in (?)");
    pstmt.setString(1,"'Person 1','Person 2','Person 3'");
    pstmt3.execute();
    Workshop's DBControl internally uses a PreparedStatement, hence you would
    obtain the same result.
    To get it working, you will need to pass in the 3 strings separately
    as
    below:
    conn.prepareStatement("select empid from empdemo where name in
    pstmt.setString(1,"Person 1");
    pstmt.setString(1,"Person 2");
    pstmt.setString(1,"Person 3");
    Please do let me know if you have further queries regarding the issue.
    Regards,
    Anurag
    Workshop Support
    "James Chamberlain" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I am having problems with the sql parameter substitution. I have aquery
    that
    looks like this:
    select name,value from table where name in ('name1','name2');
    I have tried building a string that equals "'name1','name2'" and passingit as
    a parameter to sql entering the javaDoc comments like:
    select name,value from table where name in ({nameString})
    The problem is that when it is substituted and set to the databaseit
    looks like
    this:
    select name,value from table where name in ('\'name1\',\'name2\'');
    This will not work. Does anyone have any suggestions on how to do thisusing a
    database control. Basically I'm looking for the ability to create dynamicsql
    statements.
    Thanks for your help.
    Regards,
    James

  • URGENT: Parameter Passing Problem

    In Forms 6i I am sucessfully passing parameters from one form to another. The problem is I want the receiving form to execute the query at startup. I cant run execute_query; unless the form is in enter_query mode. In a trigger execute_query cannot be run in Enter_Query mode. So I am stumped. Ideally I wanted to try:-
    -- Initailise Block Items with Parameters --
    Enter_Query;
    :interview.Position_ID := :PARAMETER.p_Position_ID;
    :interview.Candidate_ID := :PARAMETER.p_Candidate_ID;
    Execute_Query;
    Obviously the reasons above stop me doing the above example.
    Please Help

    Hello
    This example is base on the dept table.
    Please try this
    trigger ->WHEN-NEW-FORM-INSTANCE
    :GLOBAL.my_var := 10;
    trigger ---> PRE-QUERY
    SET_BLOCK_PROPERTY('emp', DEFAULT_WHERE, 'DEPTNO= ' ||:GLOBAL.my_var);
    it works fine in my little example put the trigger on Forms level.
    Best regards Patrick.

  • ADF Parameter Form problem

    Hi all. I'm using the new JDev 10.1.3. I tried to add a Parameter Form as described in the "Build a Web Application with ADF Business Components and JavaServer Faces" Tutorial at http://www.oracle.com/technology/obe/obe1013jdev/masterdetail_adf_bc/master-detail_pagewith_adf_bc.htm#t7.
    I get the following exception when I run the page.
    Has anyone come across this problem yet?
    500 Internal Server Error
    java.lang.NullPointerException     at oracle.adfinternal.view.faces.renderkit.core.xhtml.EditableValueRenderer.addOnSubmitConverterValidators(EditableValueRenderer.java:178)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleInputTextRenderer.encodeAllAsElement(SimpleInputTextRenderer.java:82)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.FormElementRenderer.encodeAll(FormElementRenderer.java:48)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.delegateRenderer(CoreRenderer.java:271)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.renderFieldCellContents(InputLabelAndMessageRenderer.java:115)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer._renderFieldCell(LabelAndMessageRenderer.java:293)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:163)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:94)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:236)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.encodeColumnChild(PanelFormRenderer.java:275)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.renderColumn(PanelFormRenderer.java:251)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._renderColumns(PanelFormRenderer.java:545)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._encodeChildren(PanelFormRenderer.java:153)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.encodeAll(PanelFormRenderer.java:69)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:236)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeAllChildren(CoreRenderer.java:255)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:66)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:117)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:147)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:60)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:623)     at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:546)     at oracle.adf.view.faces.webapp.UIXComponentTag.doEndTag(UIXComponentTag.java:100)     at Search.jspService(_Search.java:219)     [Search.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:298)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:42)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:205)     at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)     at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)     at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)     at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)

    am not sure, but try to set the required field for this item in the property inspector to false.
    regarding the LOV, check this example : Adding an LOV to a query parameter (executeWithParams) in this link:
    http://blogs.oracle.com/shay/
    also check this:
    http://blogs.oracle.com/shay/2009/12/adf_query_with_parameters_and.html
    Edited by: M.Jabr on Feb 5, 2011 6:11 AM

  • OWB embeded process flow - parameter binding problem

    I've installed and Oracle 10g Database, after the database installation I added the Oracle Workflow server software. To complete the installation I ran the wfca.
    Later I get to define a process flow in OWB (cheesy) and the process flow seems to be working well (I've done all the registrations necesary also ), but when I am trying to do the parameter binding is not working. I do get the window prompt for the parameter and I enter the date parameter ( I tried different formats like 'YYYY/MM/DD' 'dd-mon-yyyy'), but after I check the runtime in the web browser the parameter is not pass to next process. I tried many things for the last week but I cannot get it to pass the parameter from one process to another.
    Any ideas,
    HELP !!!!!

    did u manage to resolve this issue? we are facing the same problem.

  • Call library with struct as parameter - several problems

    Hi everyone,
    I'm trying to send a MIDI sysex message to a midi device through winmm.dll using MidiOutLongMsg. I have trouble figuring out how to pass the parameters right.
    I need to call three functions (midiOutPrepareHeader, midiOutLongMsg, midiOutUnprepareHeader), all of them having the same form
    MMRESULT midiOutPrepareHeader(
    HMIDIOUT hmo,
    LPMIDIHDR lpMidiOutHdr,
    UINT cbMidiOutHdr
    where HMIDIOUT hmo is a handle that I have already. Troubling me are the other two parameters. cbMidiOutHdr is the size (in bytes) of the struct lpMidiOutHdr. This is a struct of the form
    typedef struct {
    LPSTR lpData;
    DWORD dwBufferLength;
    DWORD dwBytesRecorded;
    DWORD_PTR dwUser;
    DWORD dwFlags;
    struct midihdr_tag far * lpNext;
    DWORD_PTR reserved;
    DWORD dwOffset;
    DWORD_PTR dwReserved[4];
    } MIDIHDR;
    (Struct: http://msdn2.microsoft.com/en-us/library/ms711592.aspx
    PrepareHeader http://msdn2.microsoft.com/en-us/library/ms711634.aspx
    SendMessage http://msdn2.microsoft.com/en-us/library/ms711629.aspx
    UnprepareHeader http://msdn2.microsoft.com/en-us/library/ms711641.aspx)
    [Note: The full code for what I want to do can be found here http://www.borg.com/~jglatt/tech/lowmidi.htm (section "outputting system exclusive MIDI messages) - basically I need a translation of this code to LabView.]
    The following are my problems:
    a) How do I emulate a struct in LabView? (other threads suggest that this is done by clusters)
    b) How do I pass a pointer to a struct (cluster?) to a DLL?
    c) If I can use a cluster for this struct, how do I represent the LPSTR lpData in the cluster, i.e., a pointer to my data?
    d) how do I get the struct size for cbMidiOutHdr?
    This is how far I got, lots of it with the help of several threads in this forum:
    a) use a LabView cluster
    b) use "adapt to type" in the dll call (couldn't get this to work)
    c) I use a type cast on my string in the hope that what it returns is the register address (and I'm probably superwrong here)
    d) my cluster consists of 9 elements of 4 byte datatypes, so I just use 36 for cbMidiOutHdr
    The dll seems to be happy with the way I pass the cluster - I get error codes of 0 in both the PrepareHeader and UnprepareHeader functions. However, sending doesn't work (error code 7). Guessing that the type cast returns a pointer, I have also cast the cluster to an Int32 and passed that parameter as pointer to numeric value. Interestingly, the PrepareHeader and UnprepareHeader functions are still happy, but I get a different error code from the sending (code 11)
    Most of what I've done so far is guesswork, and I'm out of guesses now. I've attached the code to this post (it uses VIs from the NI MIDI example library ftp://ftp.ni.com/pub/devzone/epd/midi-example.llb ). I'd appreciate any help with this. Thanks!
    Attachments:
    Write MIDI SysEx Message.vi ‏21 KB

    First off, this problem doesn't have anything to do with control references; those have meaning only inside of the LabView environment.
    My first suggestion is to look for a higher-level library that will do whatever MIDI function you are trying to call. If you can find an ActiveX or .NET object that will control the MIDI subsystem, I recommend that you use it instead since it will be a lot easier.
    If calling the DLL directly is the best option (and calling DLLs is absolutely the way to go when you need high performance) then you need to understand how LabView passes data to library functions. That is described here:
    http://zone.ni.com/reference/en-XX/help/371361D-01/lvexcodeconcepts/configuring_the_clf_node/
    As you can see there are a lot of ways to pass data, but they boil down to this: LabView can pass, via various levels of dereferencing, a pointer to some [mostly] flat data. Things are easiest when your DLL mimics LabView's own data storage methods. For example, wiring a cluster into a node set with Adapt to Type passes a handle (struct**, pointer to pointer to [mostly] flat data). So if you are writing your own DLL, it's pretty easy to write something that works nicely with LabView data (e.g., strings with 4-byte length headers, self-describing arrays) and in fact the result is cleaner looking than its "pure C" variant because of the self-describing arrays and string length prefixes. (I say "mostly" flat because LabView clusters with variable-length elements aren't stored in a flat format.)
    When it comes to matching someone else's API things get harder, and in this case you are out of luck; you are going to have to write a LabView-callable wrapper function in C because LabView can't mimic the exact data structure needed. The problem is not the struct; there is a sneaky way to pass a pointer (vs a handle) to a struct, which is to do this:
    Generate a cluster in LabView representing the struct (atomic numeric data only! no strings arrays etc!)
    Flatten to string using native byte order.
    Convert string to byte array.
    Configure the call library function note to accept a pointer to an unsigned byte array. (NOT a C-string as suggested at the bottom of the page in the link above; your data may have internal 0x00s, and it certainly doesn't need an extra 0x00 at the end!)
    The reason this works is that a pointer is just an address; as long as all the right bytes are in memory in the right order starting at that address, all is well. The DLL doesn't know that LabView thinks it is passing a pointer to an array of bytes, it just gets the pointer to the first byte and it reads and interprets those bytes according to its own struct def. Reverse the process cooming back from the DLL (convert byte array to string, unflatten from string against the LV cluster.) This method will work for any flat struct.
    In LabView 8.5 there may be a less bogus way of doing this, which is to pass the cluster in with Adapt to Type and select "Array Data Pointer" as the format. This is new and I haven't tried it.
    But in your case, you want to point to a struct that contains a pointer to a string plus some numeric data and another pointer, and this you can't do directly. LabView does not expose the location of a string to you anywhere outside the Call Library Function node, so there's no way to "find the pointer" to a LabView string from outside the DLL. What you need to do in this case is write a wrapper function in C that takes your LabView data. Only then will LabView "tell you where the bytes are" and promise not to fiddle with them until the library call is complete. Once you are in C-land, you can throw pointers around to your heart's content. As long as you do it all perfectly, all will be well. (If you write one byte too many on output, boom! :-)
    There are a few ways to do this. You could make a cluster that has meaning in LabView, e.g. replace lpData with a LabView string, then pass the cluster in to your wrapper function set to "Adapt to Type"; that will pass a handle to the cluster. You can generate the .c file from the Call Lib Fuction, and it will outline where the data is.
    Complications: In this case it's your job to convert the handle to the labview string (which has 4 bytes of length as a prefix and no trailing 0x00) to a C-string by malloc()'ing a new buffer and memcopying the string out. There might be something in the LV CIN tools that does this, I'm not sure. Make sure you release the new string after the MIDI call.
    The lazy route (which is what I would do) is pass the string as the first arg and all of the numeric stuff as the second arg, leaving the space for lpData as you have now. (I don't know what struct "midihdr_tag" is, but if that's not something you were passed in a previous call, you'll need to add a third argument for that cluster and treat it similarly.) Then you can tell LabView that it should pass the string arg as a C-string pointer. Inside your wrapper, extract the pointers and stuff them into the data structure as needed. Dereference once (to go from handle to pointer) and make the MIDI call. To be clean, put everything back where it was before in the cluster; in particular don't believe you can pass out lpData* and do whatever you want with it in LabView; LabView will release/change that address as soon as you leave the output string unwired or do anything to it (e.g. concatenate.) You'll be creating a new string buffer and a new pointer on your next MIDI call.
    All of this complication is a result of a) LabView's hiding the details of memory allocation/deallocation from you and b) LabView's internal data structures being a bit different from C conventions (e.g. LabView strings vs. C strings). The second means that even when LabView is using non-flat data structures (e.g. cluster containing an array), you can't just blindly pass them along to a C function and expect it to work right. It would be nice if NI would write a little mini-compiler into the Call Library Function that would do what our wrapper function is going to do, but that's probably a fairly significant project. 
    Still, each function wrapper is only going to have about 10 lines of C. You can put wrappers for all the MIDI functions you want to call into a single DLL, then ship that DLL with your app.
    (Now you see why I suggested you look for an ActiveX MIDI control!)
    -Rob Calhoun

  • Output Parameter cast problems

    Wondering if anyone has seen this ...
    Migrating a data access layer (based on the MS DAAB) using the ODP.NET provider. I wrote my own parameter discovery code to dynamically configure parameters at runtime - just like the SqlCommandBuilder.DeriveParameters() method does for SQL Server sprocs.
    (I query the "all_arguments" view to get this data, by the way, passing the package name and procedure name.)
    Here's the problem: you cannot discover the Size property for a parameter via this query. Bummer. So for VarChar2 and Char types I tried setting the Size to somethng big, like 2000.
    When I retrieve the parameters after an ExecuteNonQuery statement, I am getting Type cast errors:
    "Cast from type 'OracleString' to type 'String' is not valid"
    Here's the weird part:
    - CType(params(5).Value, Integer) 'WORKS
    - CType(params(2).Value, String) 'DOESN'T WORK
    - params(2).Value.ToString 'WORKS
    - CType(params(2).Value, Date) 'DOESN'T WORK
    What the ...? Why can't I cast a VarChar2 or Char type back to a .NET String? Why does ToString work but Ctype() not work?
    I hope somebody can offer guidance, I've got a lot invested in this DAL :-)
    Thanks eh
    Kurt Mang
    Vancouver BC

    There's not really an elegant way to provide these conversions in VB. In C# OracleString uses operator overloading to provide type conversions, but this version of VB doesn't support it.
    They might have implemented IConvertible on the oracle types.
    Then you could write
    Dim osw as new OracleString("Hello")
    Dim s as String = CType(osw, IConvertible).ToString
    But that's not really better than
    Dim osw as new OracleString("Hello")
    Dim s as String = osw.Value
    The long and short of it is, OracleTypes ( and other ADO.NET provider types), are special high-performance types (usually value types), and they convert using a different idiom. By convention they are converted to the corresponding framework type using a property called .Value, and constructed from framework types using a constructor.
    String s = New OracleString("Hello").Value
    Converts the Unicode string "Hello" to an OracleString structure, and then back to a unicode string.
    David

  • Parameter List Problems

    Post Author: Mbonz
    CA Forum: .NET
    Hi all,
    I have a VB.Net application that programatically passes pick list values to BO report parameters from an Access recordset (BO Enterprise XI R1 SP3). When the user selects "..." (i.e. all records) from the drop down I add all values from the recordset to the parameter. Simple enough.
    However, when I open the ReportViewer, everything hangs and the system times out with the error "Page Server has been shut down or the service is unavailable".
    The bizzare thing is that it all works perfectly if I reduce the number of parameters I am populating so I assume it is a list size problem, something to do with IE7 or a problem with IIS on a Windows 2000 Server. (It seems to work in an IE6 test environment using IIS on Windows XP)
    Has anyone come across this problem?

    Post Author: dhopp
    CA Forum: .NET
    I had a simliar problem to this a few years ago with CR9 reports.  I had to come up with a different value to use when the user selects "all" rather than passing in the string value for each option then interpret it in the either the report or the database.  There was a hotfix for CR9 to fix long character parameter values but I still found it cleaner to use a single character to represent "all".
    HTH,Dia

  • Parameter list problem

    Hi guys how are you
    i created a form that opens a number of reports and i send a different parameter list to each report but th thing is that the parameter list only affects one report is there any settings should be set to the report or is there problem in the trigger
    thanks

    You may have to check the parameter names called from the forms and used in the reports. If in report it doesn't exist, report is not going to give you the results as you like.

  • RFC parameter conversion problem

    Hi,
    currently I'm calling out of a business process a RFC module in the ABAP stack of our XI to access a DB table which is also located on XI. This table has got one key field of a 25 character length.
    In our RFC we are sending in the moment in this key field only a length of 21 characters and the select statement in the module has got problems to find the equivalent table entry. When we test the function module in the ABAP stack with the same key the entry is found.
    It seems that the key parameter is shifted between the RFC-XML and the module itself.
    Any ideas to solve this?
    Thanks,
    Christina

    Henrique,
    thanks for your answer.
    I filled the field with zeros on the left up to 25 characters. The program added it to the database as new entry.
    Even when I fill the field to its full length with any other value the select statement doesn't find the existing entry and tries to add a new one.
    More ideas?
    Thanks.

Maybe you are looking for

  • Java Web Start Error - java.io.IOException: EOF reading band

    I am using Java Web Start to download an application and I am getting the following error. How do I resolve this? The jar that is being downloaded is present in the directory. java.io.IOException: EOF reading band      at com.sun.java.util.jar.pack.N

  • Hard Drive that Won't Show Up Wirelessly

    I've posted this elsewhere, but under a topic that was solved, so I'm trying my luck again here. Up until the most recent update of AEBS firmware, I could access my hard drive, connected via a hub to the AEBS, from my wireless laptop G4. Now, althoug

  • Need to create new users in Office 365 with custom attributes from a csv file

    I am exporting users from an active directory environment and then deleting them from AD. They are Alumni and will no longer be in AD. I have a csv file with the following fields that I need to use to create new Alumni email boxes in Office 365 for.

  • Why is my user/lib/mail folder so big?

    Looking to streamline and access some space and a look at my user/lib/mail folder shows me it's over 500Mb even after a severe trimming from within Mail. I now have a total of 268 messages across all mailboxes, folders etc, and that includes a total

  • Financial Statement (F.01) in two currencies at once

    Hi, Transaction F.01 and S_ALR_87012284 provides Financial Statements. The limitation of standard reports, as per our research, is it provides either in Company Code Currency or Hard Currency, i.e. One currency at a time, and is controlled through Cu