Passing Date to procedure give Problem

heloo...
I have two database schema, And both schema contain same procedure with Date as argument.
that procedure workes well in one schema but it give error of "INVALID MONTH" in another schema.
Any sollution of this?
Thanks

Why it is working fine in one schema and it give error in another schema? You did not post the most important part of your problem (how are you calling this procedure), but as indicated, if you are passing a string that looks like a DATE, then it can be converted to a date only using the database implicit conversion logic that will rely on NLS seetings (and those can well be different for the two users).
See replies above on how to fix this.

Similar Messages

  • Help understanding how to pass dates to procedures in a package?

    When I run the following script in SQL*Plus, I get no obvious errors, but the truncate does not happen and all the other processing doesn't happen. I ran a similar version in another tool and it worked. Much of the code is deleted here but I believe I don't fully understand passing dates in the procedure. I figure if one of the dates ends up null or something invalid, the procedure will run and give no results. If someone could correct me on how to pass variables, it would help greatly. As you can see, I am passing 2 dates in from an ACCEPT statement, passing them to 1 shell type procedure which runs other procedures and passes the dates to the procedures below it. This procedures calls the 3rd procedure and passes the same dates to it:
    ACCEPT CUR_PERIOD PROMPT 'Current Period (MM/DD/YYYY): ';
    ACCEPT PRIOR_PERIOD PROMPT 'Prior Period (MM/DD/YYYY): ';
    EXEC RCO.MONTH_END_PACK_1.MONTHENDPHASE1PROC('&CUR_PERIOD','&PRIOR_PERIOD');
    The spec looks like this:
    CREATE OR REPLACE PACKAGE MONTH_END_PACK_1 AS
         PROCEDURE MonthEndPhase1PROC(get_cur_period IN DATE, get_prior_period IN DATE);
         PROCEDURE W_CAT_INFO_RPT_PROC(GET_CUR_PERIOD IN DATE, GET_PRIOR_PERIOD IN DATE);
         PROCEDURE WO_CAT_INFO_RPT_PROC(GET_CUR_PERIOD IN DATE, GET_PRIOR_PERIOD IN DATE);
    END MONTH_END_PACK_1;
    The body looks like this:CREATE OR REPLACE PACKAGE BODY MONTH_END_PACK_1  AS
    PROCEDURE MonthEndPhase1PROC(get_cur_period IN DATE, get_prior_period IN DATE) IS
         BEGIN
              EXECUTE IMMEDIATE 'TRUNCATE TABLE RPT_DS1_CNT';
              EXECUTE IMMEDIATE 'TRUNCATE TABLE RPT_DS1_CNT_CAT';
              W_CAT_INFO_RPT_PROC(GET_CUR_PERIOD, GET_PRIOR_PERIOD);
         END;
    PROCEDURE W_CAT_INFO_RPT_PROC(GET_CUR_PERIOD IN DATE, GET_PRIOR_PERIOD IN DATE) IS
         CUR_PERIOD DATE;
         PRIOR_PERIOD DATE;
         BEGIN
              -- Assign the dates to this procedure that were passed in above.
              CUR_PERIOD := GET_CUR_PERIOD;         --07/27/2007
              PRIOR_PERIOD := GET_PRIOR_PERIOD;     --06/27/2007
              -- Execute stored procedure, passing in dates.
              WO_CAT_INFO_RPT_PROC(CUR_PERIOD, PRIOR_PERIOD);
              -- Other code goes here
         END; -- W_CAT_INFO_RPT_PROC
    PROCEDURE WO_CAT_INFO_RPT_PROC(GET_CUR_PERIOD IN DATE, GET_PRIOR_PERIOD IN DATE) IS
         CUR_PERIOD DATE;
         PRIOR_PERIOD DATE;
         BEGIN
              CUR_PERIOD := GET_CUR_PERIOD;
              PRIOR_PERIOD := GET_PRIOR_PERIOD;
              INSERT INTO RPT_DS1_CNT
              (select distinct trim(CVBI_KEY) as CVBI_KEY, vendor_id
              from
              (select m.cvbi_key, v.vendor_name
              from  rco.cogs_resource m,RCO.COGS_SRVCTYP st,rco.cogs_mkt ms,RCO.COGS_VENDOR v,
                (select distinct cvbi_key, vendor_id
                 from RCO.COGS_resource
                 where period = CUR_PERIOD)ak
              where  ak.cvbi_key = m.cvbi_key
              and  trim(m.cvbi_key) = trim(st.cvbi_key(+))
              and  period = CUR_PERIOD));
         END;
    END;
    /

    EXEC RCO.MONTH_END_PACK_1.MONTHENDPHASE1PROC(to_date('&CUR_PERIOD','MM/DD/YYYY'),to_date('&PRIOR_PERIOD','MM/DD/YYYY'));
    As you can see, I am passing 2 dates in from an ACCEPT statementUntil you convert them using TO_DATE they are just strings
    Message was edited by:
    3360
    Fixed date formats

  • Passing date to procedure help

    Hello, this maybe simple question, but I couldn't figure out why I am getting
    ORA-01843: not a valid month.. Here is what I did:
    exec proc(to_date('01/01/2007','MM/DD/YYYY'),to_date(01/30/2007,'MM/DD/YYYY'))NLS setting is: DD-MON-RR
    procedure proc (date1 in date, date2 in date)
    v_date_period varchar2;
    select date_period into v_date_period from t1 where start_date = to_date(date1,'MM/DD/YYYY') and end_date = to_date(date2,'MM/DD/YYYY');
    start_date and end_date are in date MM/DD/YYYY format in the table, but the above code is failed b/c of the above error.
    One thing I noticed that when dates are passed into the procedure, they come in DD-MON-RR format and the comparion never works in cursor. start_date and end_date are in MM/DD/YYYY format. but it works only when to_date(date1,'DD-MON-RR') and to_date(date2,'DD-MON-RR'). How is it working when start_date and end_date are in MM/DD/YYYY format???
    another question is, when I say To_date, does it always convert any date to NLS setting? I used
    to_date('01/01/2007', 'dd/mm/yyyy'), but it doesn't have any effect when it goes to the procedure.. still comes as DD-MON-RR.
    what mistake i am doing? I would appreciate your ans. Thanks,

    I think I got it now. I really didn't need that extra
    conversion within the procedure. It works now. Then let's make sure it's clear for you.
    You are right to consider the NLS_DATE_FORMAT settings, that's good, as most people are unaware of it and really have no understanding whatsoever as to what it does. Perhaps your understanding of it is not quite up to scratch just yet...
    The setting relates to how oracle converts between dates and strings when no format is specified explicitly. e.g.
    SQL> select to_char(sysdate) from dual;
    TO_CHAR(SYSDATE)
    04/03/2008 10:00:11
    SQL> alter session set nls_date_format = 'YYYY MON DD';
    Session altered.
    SQL> select to_char(sysdate) from dual;
    TO_CHAR(SYS
    2008 MAR 04
    SQL> select to_char(sysdate, 'DD/MM/YYYY') from dual;
    TO_CHAR(SY
    04/03/2008
    SQL>Likewise if you convert the other way from a string to a date...
    Firstly with implicit conversion, which will assume the NLS_DATE_FORMAT setting format for the string...
    SQL> select to_date('2008 JAN 01') from dual;
    TO_DATE('20
    2008 JAN 01And then if you explicitly convert specifying the format...
    SQL> select to_date('01/01/2008','DD/MM/YYYY') from dual;
    TO_DATE('01
    2008 JAN 01However if you try and implicitly convert (using the NLS setting) but the string isn't of the correct format...
    SQL> select to_date('01/01/2008') from dual;
    select to_date('01/01/2008') from dual
    ERROR at line 1:
    ORA-01843: not a valid month
    SQL>So now let's look at what you were doing...
    select date_period into v_date_period
    from t1
    where start_date = to_date(date1,'MM/DD/YYYY')
    and end_date = to_date(date2,'MM/DD/YYYY');Your date1 and date2 are already of a DATE datatype. This means that they are already stored in the oracle internal date format. Note: ALL dates are stored the same internally regardless of how they are displayed. e.g.
    SQL> select sysdate, dump(sysdate) from dual;
    SYSDATE
    DUMP(SYSDATE)
    04/03/2008 10:35:20
    Typ=13 Len=8: 216,7,3,4,10,35,20,0
    SQL> alter session set nls_date_format = 'YYYY MON DD HH24:MI'
      2  ;
    Session altered.
    SQL> select sysdate, dump(sysdate) from dual;
    SYSDATE
    DUMP(SYSDATE)
    2008 MAR 04 10:36
    Typ=13 Len=8: 216,7,3,4,10,36,50,0
    SQL>However, you are using the to_date function. This expects the first parameter to be a string and the second parameter is an optional string specifying the format of the first string.
    So it was expecting:
    to_date(<string>,<string>)and you gave it
    to_date(<date>,<string>)When oracle comes across this sort of thing, rather than produce an error it recognises that it is able to do an implicit conversion of datatypes so internally it is doing
    to_date(to_char(<date>),<string>)Note: because it is an implicit conversion within the "to_char" it is using the NLS settings to do this.
    You said your NLS setting was DD-MON-RR, so this is the same as...
    to_date(to_char(<date>,'DD-MON-RR'),<string>)Now look at your code again with the implicit conversions in place...
    select date_period into v_date_period
    from t1
    where start_date = to_date(to_char(date1,'DD-MON-RR'),'MM/DD/YYYY')
    and end_date = to_date(to_char(date2,'DD-MON-RR'),'MM/DD/YYYY');Hmmm, so the to_date function is getting it's first parameter as a string in the format 'DD-MON-RR' and the second parameter is telling it that the first parameter is in the format 'MM/DD/YYYY'.
    The two dates you passed were:
    '01/01/2007'
    and
    '01/30/2007'
    But after the implicit conversion your code looks like...
    select date_period into v_date_period
    from t1
    where start_date = to_date('01-JAN-07','MM/DD/YYYY')
    and end_date = to_date('30-JAN-07','MM/DD/YYYY');As you can see there are numerous problems with this. The first one Oracle errored on was the fact that 30 is not a valid Month as defined by your format string.
    Hopefully that clarifies things a little more for you and you'll understand a little more about the differences between strings, dates and implicit and explicit conversion between the two using format strings and the NLS setting.
    ;)

  • Passing date to procedure

    Hi All,
    I have one scenario where I have to fetch the data from multiple tables and write it onto the spool file like.
    set pagesize 9999
    create or replace procedure p1 as
    sd date:='&Start_date';
    ed date:='&End_date';
    a number;
    b number;
    c number;
    d number;
    e number;
    f number;
    begin
    SELECT COUNT(BARNO) into a FROM DGP;
    SELECT COUNT(DISTINCT(NO)) into b FROM LOG WHERE OPERATION_DATE between sd and ed AND (OPERATION_TYPE='B');
    SELECT COUNT(DISTINCT(NO)) into c FROM LOG WHERE OPERATION_TYPE='UNBARRED' AND OPERATION_DATE between sd and ed;
    SELECT COUNT(DISTINCT(NO)) into d FROM LOG WHERE OPERATION_DATE between sd and ed AND MODE ='AUTO' AND OPERATION_TYPE ='B';
    SELECT COUNT(DISTINCT(NO)) into e FROM LOG WHERE OPERATION_DATE between sd and ed AND MODE ='AUTO' AND OPERATION_TYPE='UB';
    SELECT COUNT(DISTINCT(NO)) into f FROM LOG WHERE OPERATION_DATE between sd and ed AND MODE ='MANUAL' AND OPERATION_TYPE='B';
    dbms_output.put_line(a||' '||b||' '||c||' '||d||' '||e||' '||f);
    end;
    The above procedure asks me the date during the creation of the procedure, whereas my requirement is during the execution of the procedure it should ask me the date and that too only once.
    Pls suggest.

    create or replace procedure p1 (sd in date
                                   ,ed in date
    as
       a number;
       b number;
       c number;
       d number;
       e number;
       f number;
    begin
       select COUNT(BARNO) into a FROM DGP;
       SELECT COUNT(DISTINCT(NO)) into b FROM LOG WHERE OPERATION_DATE between sd and ed AND (OPERATION_TYPE='B');
       SELECT COUNT(DISTINCT(NO)) into c FROM LOG WHERE OPERATION_TYPE='UNBARRED' AND OPERATION_DATE between sd and ed;
       SELECT COUNT(DISTINCT(NO)) into d FROM LOG WHERE OPERATION_DATE between sd and ed AND MODE ='AUTO' AND OPERATION_TYPE ='B';
       SELECT COUNT(DISTINCT(NO)) into e FROM LOG WHERE OPERATION_DATE between sd and ed AND MODE ='AUTO' AND OPERATION_TYPE='UB';
       SELECT COUNT(DISTINCT(NO)) into f FROM LOG WHERE OPERATION_DATE between sd and ed AND MODE ='MANUAL' AND OPERATION_TYPE='B';
       dbms_output.put_line(a||' '||b||' '||c||' '||d||' '||e||' '||f);
    end;
    /create it once and call it like
    begin
       p1 (sysdate, sysdate + 1); -- pass parameters
    end;
    /and don't forget to
    set serveroutput onotherwise you won't see output from DBMS_OUTPUT
    Edited by: Alex Nuijten on Jul 14, 2009 1:16 PM

  • Error while passing date parameters in procedure and commit issue

    Hi
    1) I am doing a archiveing records and pls find my code below and i have couple of issue,pls find my code and want to ensure the commit is happening every 100000 rows inserted but i am archeiving a huge table but when i checks the table frequently it shows 0 records and after it shows count the actual rows around 20 million records.How can i ensure it commiting on every 100000 records. pls find my code my db version is 10g on windows
    CREATE OR REPLACE PROCEDURE doins as
    cnt number:=0;
    FOR x IN (select * from Call_log
    where trunc(c_date) = to_date('11-Aug-2008','DD-MON-YYYY'))
    LOOP
    INSERT INTO call_arch
    select * from Call_log
    where trunc(c_date) = to_date('11-Aug-2008','DD-MON-YYYY');
    cnt := cnt + 1;
    IF( cnt = 10000 )
    THEN
    cnt := 0;
    commit;
    END IF;
    commit;
    END LOOP;
    2) Error while passing date as parameter i am getting following errors while passing date parameter pls find my code and errors
    CREATE OR REPLACE PROCEDURE doins(p_date date) as
    cnt number:=0;
    begin
    FOR x IN (select * from Call_log
    where trunc(c_date) = to_char(p_date,'DD-MON-YYYY'))
    LOOP
    INSERT INTO call_arch
    select * from Call_log
    where trunc(c_date) = to_char(p_date,'DD-MON-YYYY');
    cnt := cnt + 1;
    IF( cnt = 10000 )
    THEN
    cnt := 0;
    commit;
    END IF;
    commit;
    END LOOP;
    end;
    exec doins(11-Aug-2008) then gives
    SQL> exec doins(11-Aug-2008);
    BEGIN doins(11-Aug-2008); END;
    ERROR at line 1:
    ORA-06550: line 1, column 16:
    PLS-00201: identifier 'AUG' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    if i gave exec doins(11-08-2008) it gaves
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'DOINS'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    rgds
    rosh

    CREATE OR REPLACE PROCEDURE doins(p_date varchar2) as
    cnt number:=0;
    begin
    FOR x IN (select A.rowid,A.* from Call_log A
    where trunc(c_date) = to_date(p_date,'DD-MON-YYYY'))
    --hope that's c_date columne is   DATE datatype
    LOOP
    INSERT INTO call_arch
    select * from Call_log
    where rowid=x.rowid;
    cnt := cnt + 1;
    IF( cnt = 10000 )
    THEN
    cnt := 0;
    commit;
    END IF;
    commit;
    END LOOP;
    end;
    thats your correct procedure - but NOT CORRECT ISSUE.
    You should use bulk collect with limit clause and forall clause to do it faster!!! Or Merge clause.

  • Problem in passing data from 1 screen to another using BBP_DOC_CHANGE_BADI.

    Hi Experts,
    i am new to the SRM, i am facing problem in passing data from one screen to another.
    my requirement is that when we select one shopping cart and press the PROPOSE SOURCES OF SUPPLY button, we will fetch all the contracts that are attached to the shopping cart.
    we have implemented a BADI implementation of BBP_SOS_BADI (method BBP_SOS_CHECK) for passing some changed values to the contracts of the shopping cart into the popup screen that is displayed when we press PROPOSE SOURCES OF SUPPLY button and when we select any contract and press ASSIGN ONLY button in the popup screen the badi BBP_DOC_CHANGE_BADI is triggered.
    i have implemented another BADI implementation of BBP_DOC_CHANGE_BADI for fetching the selected contract and pass the values to another screen, but the problem is that when we select one contract and press the assign only button we are fetching the wrong contract number ( that is in the BADI method BB_SC_CHANGE parameter IT_ITEM we are fetching the wrong contract), if we again do the same procedure for the second time we are getting the correct contract.
    i am unable to understand why we are getting the wrong contract in the first time( that is we are getting contract other than the selected one).
    as per my understanding i think when we are passing data to the popup screen using BBP_DOC_CHANGE_BADI we are not updating the shopping cart with the changed data.
    can anyone tell me how we can update the SHOPPING CART with the changed contracts data, i have used BBP_PD_SC_UPDATE, BBP_PD_SC_SAVE and other shopping cart FM but nothing is happening.
    Thanks
    Tanveer

    Hello,
    What version of SRM are you on?  Have you check for OSS Notes?  I have had trouble with BBP_DOC_CHANGE_BADI but it was because of other issues.  The BADI works pretty well and it is called almost every time something happens to the shopping cart.
    I have noticed that sometimes that values are not changed til the second calling of the BADI.  I have yet understand why but I think it has to do with prompt processing. Usually, we train our requisitioners to click the 'Check'  button to flush things out.
    I don't know if I was helpful.... another thought.... could there be an error caught by BBP_DOC_CHECK_BADI that is preventing change in BBP_DOC_CHANGE_BADI?
    Regards, Dean.

  • Pass Parmeter To Sql Data Base Procedure

    Hi,
    i used JDEVADF_11.1.1.4.0
    I have two fields Date type on the Page, and I have a Procedure database gives difference between two dates, on the road to send the values of the two date , and give me the number of days
    I make a call the Procedure in AppModuleImpl
    How can I send the parameter two dates from the screen to data base Procedure , for run the Procedure

    Hi,
    Bind the dates value to the bean and call the IMPL method with help of these value passed as argument .
    The IMPL method must exposed as client interface so that bean can access that method.
    @Gunanidhi

  • Passing data from Oracle stored procedures to Java

    We're going to write a new web interface for a big system based on Oracle database. All business rules are already coded in PL/SQL stored procedures and we'd like to reuse as much code as possible. We'll write some new stored procedures that will combine the existing business rules and return the final result dataset.
    We want to do this on the database level to avoid java-db round trips. The interface layer will be written in Java (we'd like to use GWT), so we need a way of passing data from Oracle stored procedures to Java service side. The data can be e.g. a set of properties of a specific item or a list of items fulfilling certain criteria. Would anyone recommend a preferable way of doing this?
    We're considering one of the 2 following scenarios:
    passing objects and lists of objects (DB object types defined on the schema level)
    passing a sys_refcursor
    We verified that both approaches are "doable", the question is more about design decision, best practice, possible maintenance problems, flexibility, etc.
    I'd appreciate any hints.

    user1754151 wrote:
    We're going to write a new web interface for a big system based on Oracle database. All business rules are already coded in PL/SQL stored procedures and we'd like to reuse as much code as possible. We'll write some new stored procedures that will combine the existing business rules and return the final result dataset.
    We want to do this on the database level to avoid java-db round trips. The interface layer will be written in Java (we'd like to use GWT), so we need a way of passing data from Oracle stored procedures to Java service side. The data can be e.g. a set of properties of a specific item or a list of items fulfilling certain criteria. Would anyone recommend a preferable way of doing this?
    We're considering one of the 2 following scenarios:
    passing objects and lists of objects (DB object types defined on the schema level)
    passing a sys_refcursor
    We verified that both approaches are "doable", the question is more about design decision, best practice, possible maintenance problems, flexibility, etc.
    I'd appreciate any hints.If logic is already written in DB, and the only concern is of passing the result to java service side, and also from point of maintenance problem and flexibility i would suggest to use the sys_refcursor.
    The reason if Down the line any thing changes then you only need to change the arguments of sys_refcursor in DB and as well as java side, and it is much easier and less efforts compare to using and changes required for Types and Objects on DB and java side.
    The design and best practise keeps changing based on our requirement and exisiting design. But by looking at your current senario and design, i personally suggest to go with sys_refcursor.

  • Problem with passing date parameters in cursor

    Is there any problem in passing date parameters and like clause as below
    CURSOR eftcursor(start_date DATE, end_date DATE, where_clause varchar2) IS
    select * from r_records
    where created_date between start_date and end_date and description like where_clause;
    and in the open statement
    select to_date('01/06/2010 00:00:00', 'dd/mm/yyyy hh24:mi:ss') into startDate from dual;
    select to_date('01/07/2010 00:00:00', 'dd/mm/yyyy hh24:mi:ss') into endDate from dual;
    str := '%something%aaaaa%';
    open eftcursor(startDate ,endDate , str);
    Do i need to do any kind of conversion in the cursor where clause or when i am passing the parameter in open statement.

    Almora wrote:
    Do i need to do any kind of conversion in the cursor where clause or when i am passing the parameter in open statement.No, your code looks correct -- ou're passing a date to the cursor.
    You might consider whether you really need an explicit cursor though. An implicit cursor is easier to code and performs better.

  • Problem in passing data from one .jsp page to another .jsp page

    i have a problem here
    Actually i have 2 jsp pages. What im trying to do here is actually i want to pass data from the first jsp page to the second for updating
    The first jsp page contains data that user wants to update in the form of table.
    <td><img src = "edit.gif" alt = "edit" border="0" ><td>
    <TD><%= Name %></td>
    <TD><%= rs.getInt("Age") %></td>
    <TD><%= rs.getString("Gender") %></td>
    So this page displays the data that users wants to update plus one image button (edit button). So when user clicks this button, all the data in this page will be brought to the second .jsp page called updatePersonal for updating.
    The problem here is that it is not displaying the existing data in the second .jsp page.
    The second page basically contains forms
    <INPUT TYPE="text" NAME="FirstName" maxlength="30" value = "<%=FirstName%>">
    Can someone please help me. I really dont know what to do..How do i get the data displayed in the text field that is passed from the first .jsp page..thankx in advance

    Please modify below code to:
    td><img src = "edit.gif" alt = "edit" border="0" ><td>
    -----------------modified code
    td><a href="updatePersonal.jsp?FirstName=<%=rs.getString(FirstName")%">&LastName=<%=rs.getString("LastName")%>&Age=<%=rs.getInt("Age")%>&Gender=<%=rs.getString("Gender")%>"><img src = "edit.gif" alt = "edit" border="0" ></a><td>
    I'm sure it works</a>

  • TCP Communication Problem - not passing data???

    Hello.
    I am working on TCP communication. I need to pass data from one PC to another and vise versa. I started with the shipped example TCP Communicator Active and Passive VI. Using the shipped example only with the Wireless Unit connected to both PC i am able to communicate and pass data between each PC.
    Now, placing the shipped example VI to my Main VI (separate while loop), I am NOT able to make it run properly. What happens is even if i move the control data on one PC it does not update to the other PC.
    I am attaching the example VI and I would appreciate for any advise.
    Thank you very much. 
    regards,
    jtc
    Attachments:
    TCP Communicator Active.vi ‏51 KB
    TCP Communicator Passive.vi ‏53 KB

    Hi jtc,
    "if you need to share data aquiired rapidly, a work-around is to accumulate the acquired data and send larger "bundles" less frequently" - do you have a simple example VI for this?
    No!   - though we could develop something - but a solution for the current example, might not be helpful to your final program.  For instance, we would capture & accumulate a "batch" of data "produced" by individual user actions, then send the "batch" of data to the other machine and what? Perform all the updates to the GUI in rapid succession (what's the point?.)  Show the last user action/setting?
    It might be a good time to develop the architecture for the Master and Slave applications.
    This sounds like an interesting application!  Do you mind sharing some detail?  For instance, are the slaves generating data?  Are there a fixed number of slaves?  Is it necessary to mirror the Master's data on all the connected slaves?
    Like Johnny-5 said: "Input, I need Input!"
    Cheers!
    Message Edited by tbd on 10-17-2008 08:29 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • How to pass Data from one form to the other

    Hi all
    Can any one suggest me how to pass data from one form to the other form, which i zoomed from the original one?
    I tried to do this by passing parameter in Event Procedure but i am getting error msg when i am opening the zoomed form.
    If any one of u have any idea, give me a reply
    Thank you
    Suhasini

    If you choose the second alternative you should erase these global variables after the second form is opened
    You can erase the global variable using:
    erase('global_var')
    Greetings,
    Sim

  • Bidirectional binding and passing data.

    I started learning Flex and I have couple of problem of which I can't see a clear solution.
    Flex 4 has two way binding, but how can I use it with data type different from strings? I receive from a web service dates and numbers, let the user edit them and send them back to the web service. Flex 4 code generator created all the necessary objects, that contain numers and dates types. Presenting them to the user in text fields (or date fields) is easy, but I can't get such a simple way to send them back. When I try two way binding it gives compilation error because it think I'm trying to force a cast from String to Number or Date. If I understand correctly, the only way to get the data back to the web service is:
    Introduce validators for Numbers and Dates
    For each of the form element, check if it is valid
    If all of them are valid, convert them manually to the appropriate type
    Populate back the original object with new values (and then send it to the web service)
    Is there a smarter way to let the two way binding work the way is meant to be? Is there some way to set the converter to use when binding back from String to Number?
    By the way, is there some simple way to ask a Form object that all the contained fields are valid?
    The second problem regards passing data among different views: is there a standard way in Flex to "share" data between different mxml files? I have two scenarios:
    A view (mxml file) uses a lot of components (other mxml files, that may include other components as well). There are a few objects, mostly data container, that I'd like to use in most of this hierarchy. Which is the best way to share these objects? Do I have to set something static in the root view and have all the other components access them statically? Or do I have to write setters in all the components in the hierarchy and pass all the objects down the hierarchy? Is there a quick way to set up a sort of "session" for this hierarchy and access it?
    A view (mxml file) presents a list of results. Selecting/clicking on one of the results the user goes to another view (mxml file, may be a module), but in the new view I need a reference to the data the user selected in the previous view. The first solution here seems to be using an event and passing the data with it, but is there any other way? I'm looking for something that can cover both this and the previous case.
    Any suggestion is welcome. Sorry if the question was already posted but I didn't find any clear answer.

    This works as expected for me: I see the text "invalid" any time a change occurs to the text in the text field that causes the value of the DoubleProperty to change.
    E.g.:
    Select the default value (42.0); press a non-numeric key to change the text. The invalidation listener is invoked.
    Delete the text. The invalidation listener is not invoked (the text is now "", which causes a NumberFormatException, the double property is "set" to zero, which is no change so there is no notification).
    Enter 0. There is no notification (the value of the DoubleProperty has not changed).
    Enter a non-zero numeric value. The invalidation listener is notified.
    Change to zero. The invalidation listener is notified
    Change to non-numeric text. The invalidation listener is not notified (the value of the DoubleProperty has not changed).
    If you're expecting the text to update to zero when non-numeric text is input: I guess the implementation is something like
    if (! converter.fromString(text).equals(value)) {
         // updateText
    in the binding's method that listens for changes in the DoubleProperty. This is similar to not seeing "1.0" appear in the text field when you type "1"; or "123.0" appearing when you type "0123", etc.

  • Repeatly passing data to and from external program

    I'm looking for some help to get me started.  I'm willing to bet
    the info is here I'm just not sure what to look for and my searches
    aren't reveiling anwsers. 
    Background: I'm trying to take control of a device that is comunicating
    through the PCI bus.  The device has a set of API dll's that I can
    access through C++, but not directly in LabVIEW.  So wish to creat
    a wrapper program that will give LabVIEW indirect access to the
    dlls.  
    Problem: I've breifly read up on CINs and Libaray call functions and
    have found one underlying problem with both.  I have not found a
    way to pass data back and forth between the external code and LabVIEW
    once the external code is running.  I require an interactive
    conection between the two. 
    Any sugestions of what to search for would be greatly appreatiated, or even how to resolve my problem.
    Thank you.
    Don't get even, get odd!

    If the data buffers are owned by the driver and are updated asynchronously, you should expose that buffer to LabVIEW as a handle (simple int32 for the pointer to the buffer). This can then be passed to the wrapper code and checked (implements your polling). Remember that handling tasks in LV that should run in parallel is different from C++ however - you don't create threads, instead you should simply set up independent loops.
    I'm not sure what else to suggest since I don't fully understand what the API does or what the HW is doing, so feel free to post more information if you want more suggestions
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • Passing data to main vi's and error 1055

    Hello! I am perplexed by an error that I am getting in LV 8.2 and I would certainly appreciate any insight as to why this might be occurring. I have searched through this forum, but did not find any answers that seemed to be particular to this problem.
    All I want to do is pass data from a sub vi to a main vi, while being able to see that data execute in the sub-vi (i.e. from the main vi front panel). One way that I learned to do this is to have a control refnum object on the sub-vi wired to a property node and write the data property. I then create a reference to a control in the main vi. It is the refnum wire from the sub-vi that is then wired to the reference to the control that I wish to update. This however only works for a given VI (executing from the sub-vi and/or the main) about 50% of the time. When it does not work, I get error 1055: Object reference is invalid. This error is originating from the property node in the sub-vi. I can run the sub or main vi again, without changing anything, and it will run fine. I do, however, seem to see the error less often when running from the main vi.
    I have tried changing the refnum object in the sub-vi from the generic control class (default) to the exact type of control that I am passing data into in the main vi (in this case a cluster). Both variations seem to execute with and without the error consistently.
    Thanks in advance for any replies!
    Attachments:
    sub-vi.JPG ‏67 KB
    main-vi example.JPG ‏17 KB

    If you can make it strictly typed I would use that.  Then you will know if you are wiring the correct data into the value property node. I am not sure what to say about the error.  It seems to me that you are doing it the way I would.  One thing you could try is to test the refnum first with a comparision "not a number/path/refnum?".  This wont solve the error but maybe you can catch it before it happens.  Maybe your main VI is closing the control reference befor the sub VI is finished?  From your pics I don't see how this would happen.
    orbit wrote:
    Everything seems to work fine when running from the main vi, but still gives an error when just running the sub-vi. This behavior is fine as long as I don't get the error in the main vi as I did before!
    I just re-read this part above.  Are you trying to run the subVI alone?  You will for sure get an error 1055 because you didn't pass in a valid reference.  This valid reference is generated from the main VI (it is possible you may not get the error if the main VI was run once and still in memory because the subVI will still hold the mainVI's control refnum).
    If you want to run the subVI without running from the main VI you will have to handle the invalid refnum or you will get the error. 

Maybe you are looking for

  • PDPageDrawContentsToWindowEx doesn't display the stamp annots

    Hello, While I use the PDPageDrawContentsToWindowEx with the flag to draw the stamps (kPDPageUseStampAnnotsOnlyPI) it doesn't work. I mean that the stamps are not display on the page. Using the flag kPDPageUseAnnotFacesPI I have no problem. The probl

  • WCS 5.0.56.2 Auto-Provisioning

    In WCS 5.0 Cisco introduces Auto provisioning of WLCs. Unfortunately there is not much documentation available, except for option explanation. If i understood this right, Auto-Provisioning takes care of the initial setup of an out-of-the-box WLC. A v

  • "Do not Disturb" feature is not working with iOS6 update in iPhone4

    I have updated iOS6 on my iphone 4. I tried to turn on "Do not Disturb" feature, schedule time then test it but it is not working. Phone is ringing with vibrate & tone. kindly fix this bug.

  • ASW Upgrade from 10.4 Server to 10.5.. anyone having Serial Number problems

    i have successfully upgraded 10.4.10 sever on a PPC mac-mini with a gig of ram to 10.5, but the ASW provided Serial Number is not working for me.. anyone else having this problem?

  • Need old 'missing plug in' for Java 6

    Hi all, I have recently downloaded the new Java 7 download however this is not compatible with alot of programmes that I need to use on my computer. I have completly restored all of my computer and am now back to square one so have the Java 6 downloa