How to refer a packaged variable

Hi,
I have gone through the forum where it mentions how to refer a constant in a package.I want to refer a variable declared in package spec.
CREATE OR REPLACE PACKAGE p1
IS
sDebugMode VARCHAR2(3) := 'ON';....
end;

user8731258 wrote:
I have gone through the forum where it mentions how to refer a constant in a package.I want to refer a variable declared in package spec.
CREATE OR REPLACE PACKAGE p1
IS
sDebugMode VARCHAR2(3) := 'ON';
end;
In order to use PL/SQL variables (including global static variables), a SQL needs to be created with bind variables. This requires the use of PL/SQL itself. The following is thus valid:
create or replace procedure GetFooCursor( cur out sys_refcursor ) is
begin
  --// PL/SQL creates a SQL bind variable and bind it using
  --// the PL/SQL variable
  open cur for select * from foo_table where foo_switch = p1.sDebugMode;
end;However, you cannot do the following using SQL only:
SQL> select * from foo_table where foo_switch = p1.sDebugMode;The SQL engine needs to resolve what "+p1.sDebugMode+" refers to. The SQL engine only support calling PL/SQL functions. It is not capable of looking inside the PL/SQL engine's memory and access PL/SQL variables directly.
So if you want the SQL engine to access that variable directly, you need to create a PL/SQL function that returns the variable value. Which is not really a great approach:
create or replace function SillyFunc return varchar2 is
begin
  return( p1.sDebugMode );
end;The following SQL can then be used:
SQL> select * from foo_table where foo_switch = SillyFunc();

Similar Messages

  • How to refer to a variable package name

    Hi All,
    I'm revising my PL/SQL packages, e.g. Pkg_Name_01, Pkg_Name_02 ... So if refering to a function within such a revised package, I need a method to get the version string from a global variable and then call the function via Pkg_Name_<version_string>.Function_Name (where version_string is the value of a global variable).
    Can anybody tell me if this is possible and if so how to achieve this?
    Thanks & Regards
    Carolin

    Carolin wrote:
    But as I have a lot of references to revised packages in my code it's a bit error-prone with each new revision - so I thougt there would be a better/simpler solution... How would the approach with dynamic sql look like?<i>Dynamic SQL is Evil ™</i> - okay not always. Judged from what is posted here, a full 1% of all dynamic SQL is not evil.
    The simpler solution is to use scope to enable your code to reference the appropriate version. In Oracle, there is unfortunately/fortunately no session scope in this regard. Resolution scope is either local (schema) or public.
    For example, the code library (schema <i>CODELIB</i>) has several versions of the FooInterface package, e.g.
    - CODELIB.FooInterface_v100
    - CODELIB.FooInterface_v110
    - CODELIB.FooInterface_v200
    Your schema, APP123 needs to use version 1.0 of this interface. A local schema synonym provides name resolution scope:
    create or replace synonym FooInterface for CODELIB.FooInterface_v110
    Another schema, HRDEMO, needs to use the latest version of the interface. Thus, as that schema:
    create or replace synonym FooInterface for CODELIB.FooInterface_v200
    Assuming FooInterface is a well behaved interface, you can at any time upgrade your schema to using a newer version of the interface, by recreating your schema synonym for the interface. And no code changes will be needed to your application code to keep it working.
    If your versioning needs are finer grained at this and at session level (e.g. different sessions in schema APP123 needs to use different versions of the <i>FooInterface</i>), then you have a serious implementation and versioning problem. Ones that cannot and should not be solved technically (using hacks like dynamic SQL). But ones that need to be addressed via change control and s/w management - in other words, you then have a broken SDLC (Software Development Life Cycle) that needs to be fixed.

  • HOW TO CALL A PACKAGE VARIABLE INTO ODI

    Hi,
    Please help me with a solution for capturing a variable from a package into odi. I have seen the solution given by cezar in odiexperts.com but we are not looking for a package creation thru odi. Please suggest any other method.
    Thanks
    Venkat

    Pass it to the SP as a variable
    - there are examples in the cf docs

  • How do I use bin variable in package without asking a user?

    hi,
    I would like to write an SQL but I want to use bind variable in package as a static without asking user? Like below?
    I would like to ask you, below there is a emp_id variable? Is this BIND variable?
    DECLARE
    bonus NUMBER(8,2);
    emp_id NUMBER(6) := 100;
    BEGIN
    SELECT salary * 0.10 INTO bonus FROM employees
    WHERE employee_id = emp_id;
    END;
    If not, like this SQL how can define a BIND variable as static inside a code? not asking a user?
    db version. 9.2.0.8
    regards and thanks

    OracleADay wrote:
    I would like to ask you, below there is a emp_id variable? Is this BIND variable?
    DECLARE
    bonus NUMBER(8,2);
    emp_id NUMBER(6) := 100;
    BEGIN
    SELECT salary * 0.10 INTO bonus FROM employees
    WHERE employee_id = emp_id;
    END;
    /In the query "SELECT salary * 0.10 INTO bonus FROM employees WHERE employee_id = emp_id" emp_id is turned into a bind variable because
    if you are coding static SQL in PL/SQL then PL/SQL wil automatically use bind variables: please read http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/overview.htm#sthref145.
    This can also be proved with SQL trace. The following code:
    alter session set sql_trace=true;
    declare
    v number;
    c number;
    begin
    select count(*) into c
    from t
    where x=v;
    end;
    show errors
    alter session set sql_trace=false;generates following raw trace file section with 10G XE:
    =====================
    PARSING IN CURSOR #2 len=79 dep=0 uid=69 oct=47 lid=69 tim=33338762257 hv=2860574766 ad='3c10120c'
    declare
    v number;
    c number;
    begin
    select count(*) into c
    from t
    where x=v;
    end;
    END OF STMT
    PARSE #2:c=46800,e=329811,p=0,cr=9,cu=0,mis=1,r=0,dep=0,og=1,tim=33338762253
    =====================
    PARSING IN CURSOR #1 len=35 dep=1 uid=69 oct=3 lid=69 tim=33338788761 hv=3539261652 ad='3c10053c'
    SELECT COUNT(*) FROM T WHERE X=:B1
    END OF STMT
    PARSE #1:c=0,e=216,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=33338788755
    =====================Edited by: P. Forstmann on 17 mai 2011 17:47
    Edited by: P. Forstmann on 17 mai 2011 17:55

  • How to refer to a protected class outside the enclosing package

    Hi all,
    At the page 357 of the book Java Language Specification(Second Edition), when saying about checking accessibility of Type and Method, they concern Let C be the class containing the method invovation T.m, if T is in a different package than C, and T is protected then T is accessible if and only if C is a subclass of T. I just wonder how to refer a protected type outside the package it declared.
    For example,
    package test;
    public class test {
    static protected class protectedTest {
    public void foo() {..}
    in another package
    import test.*;
    class subtest extends test.protectedTest {  <- error
    Anyone can give me an example showing an invocation directly to foo() declared in class test.protectedTest ? The invocation should appear outside package test.
    Thanks,
    Ha Chau

    The protected inner class would be accesible only within a class which extends test, where you could either use or extend it as in:
    class subtest extends test {
        private static class sub2 extends protectedTest {
               }

  • How to declare a global variable from a PL/SQL package

    Hi All,
    Using a global variable is a bad practise for all language. However, in my case, I have a PL/SQL package defines all constants, and I want to use them directly via SQL statement, for instance,
    PACKAGE my_const
    IS
         DEFAULT_ZIP_CODE CONSTANT VARCHAR2(5) := '00000';
    END;And I cannot referrence this variable from my select statement as
    SELECT my_const.DEFAULT_ZIP_CODE from dual;I have to create a function via my package, as,
    FUNCTION get_default_zip_code RETURN VARCHAR2
    IS
    BEGIN
         RETURN DEFAULT_ZIP_CODE;
    END;and
    SELECT my_const.get_default_zip_code from dual;I don't want to create functions to referrence the default varaibles. Does anyone have any clues?
    thanks
    Edited by: user4184769 on Jul 19, 2010 8:36 AM

    riedelme wrote:
    thanks for the info. Your scope explanation makes sense even though it is not intuitive to me. I think the usage of package variables should be supported by SQL (they're just values to be copied) Maybe look at it from another language's perspective. You want to use a global PL package variable in Java/C#/Delphi/VB/etc. How would you do it?
    None of these languages can crack open the data segment of a PL code unit, inspect the variables in it, and extract a value from it. Instead, it needs to be done as follows:
    Using sqlplus as the client illustrates how all these languages will need to do it:
    SQL> var value varchar2(20);
    SQL> begin
      2>     :value := SomePackage.someVar;
      3> end;
      4> /So why should SQL behave differently? It is not the same as the PL language. It is not a subset of the PL language. Yeah, PL/SQL blurs the line between these 2 languages making it very simple for us to mix their source code. But PL/SQL is SQL integrated with PL - not PL integrated with SQL. PL has tight hooks into SQL, creating cursors for you, defining bind variables, binding variables and doing the whole Oracle Call Interface bit for you.
    But SQL has no need for PL code, just as it has no need for Java code, or Delphi code or VB code. Yes, it is possible for it to call Java stored procs. As it is possible for it to call PL procs. But these are via the formal call interface of those languages - not via tight integration hooks that blur the languages and make SQL and Java, or SQL and PL, look like a single integrated source code unit.
    Thus SQL has the pretty much the same constraints in calling the PL language as other languages do. What SQL can do is use the PL engine's call interface and tell it "+execute this function and return the result of the function+".

  • Unable to refer package variable outside package

    Why am I unable to refer package variable defined in its spec outside in blow example?
    =================================================
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.3.0 - Production
    SQL> create or replace package xx_my_package is
    2 x VARCHAR2(10):='ABC';
    3 end xx_my_package;
    4 /
    Package created.
    SQL> select xx_my_package.x from dual;
    select xx_my_package.x from dual
    ERROR at line 1:
    ORA-06553: PLS-221: 'X' is not a procedure or is undefined
    SQL>
    ===============================================

    We cannot use PL/SQL variables in SQL ... unless we use that SQL inside a PL/SQL block:
    SQL> create or replace package xx_my_package is
      2    x VARCHAR2(10):='ABC';
      3  end xx_my_package;
      4  /
    Package created.
    SQL> select xx_my_package.x from dual
      2  /
    select xx_my_package.x from dual
    ERROR at line 1:
    ORA-06553: PLS-221: 'X' is not a procedure or is undefined
    SQL> create or replace function get_x return varchar2
      2  as
      3    rv varchar2(10);
      4  begin
      5    select  xx_my_package.x
      6    into rv
      7    from dual;
      8    return rv;
      9  end;
    10  /
    Function created.
    SQL> select get_x from dual
      2  /
    GET_X
    ABC
    SQL> Cheers, APC

  • How can I share Pin variable between two packages?

    Hi every one,
    Is there any one who knows how can I share Pin variable that it is defined with OwnerPin between two packages in java card( with eclipse 3.1),I studied Sharing Interface subject and I knows it teorical but I can not do it practical .
    I can share primitive data type but I can not share Ownerpin.
    If anybody has some sample codes or knows any link ,please inform me.
    My code is same as below:
    //In Server Side
    package ginaPack;
    import javacard.framework.*;
    public class GinaApplet extends Applet implements GinaInterface{
    OwnerPIN pin;
    private GinaApplet (byte[] bArray,short bOffset,byte bLength) {
        pin =new OwnerPIN(PIN_TRY_LIMIT,MAX_PIN_SIZE);
              byte PinTemp[] = new byte[4];
              PinTemp[0] = (byte) 0x31;
              PinTemp[1] = (byte) 0x31;
              PinTemp[2] = (byte) 0x31;
              PinTemp[3] = (byte) 0x31;
              pin.update(PinTemp, (short) (0), (byte) PinTemp.length);       
        public Shareable getShareableInterfaceObject(AID clientAID,byte parameter)
              return  this;
        public OwnerPIN getPinShareable()
             return pin;         
         public void process(APDU apdu)
                      //there are some codes in this here
    }//Interface in Server side
    public interface GinaInterface extends Shareable
          public OwnerPIN getPinShareable();
    }//In Client side
    import ginaPack.*;
    public class UserCardApplet extends Applet {
    private UserCardApplet(byte[] bArray, short bOffset, byte bLength) {
         //there are some codes in this here
    public boolean select() {
              final byte[] Gina_AID={(byte)0x47,(byte)0x69,(byte)0x6e,(byte)0x61,(byte)0x41,(byte)0x70,(byte)0x70,(byte)0x6c,(byte)0x65,(byte)0x74};
              AID GinaAID = JCSystem.lookupAID( Gina_AID, ( short )0,( byte )Gina_AID.length );
              if ( GinaAID == null ) // probably not loaded on card
                        ISOException.throwIt( ISO7816.SW_FUNC_NOT_SUPPORTED );//6a 80
              GinaInterface ff = (GinaInterface) JCSystem.getAppletShareableInterfaceObject(GinaAID,(byte)0);
              if( ff == null )
                   ISOException.throwIt((short)0x0903);
    if ( ff.getPinShareable().getTriesRemaining()== 0 ) return false;
    }My problem is in this line :
    "if ( ff.getPinShareable().getTriesRemaining()== 0 ) return false; "when I select my applet this line throw an exception, ff.getPinshareable includes all of OwnerPin methods(such as getTriesRemaining ,check ,reset, update ,...)but all of them throw exception .
    I think firewal does not allow other packages uses this methods .If my guess is right then what should I do for sharing the variables that they are defined with non primitive data type such as (OwnerPin,Signature,...)
    I'd appriciated for any help.
    yours sincerely,
    Orchid.
    Message was edited by:
    NewOrchid

    Applet 1:
    package com.package1;
    import javacard.framework.*;
    public class Applet1 extends Applet {
        private static final byte tryLimit  = (byte)3;
        private static byte[] pinBytes = {(byte)1, (byte)7, (byte)4, (byte)5, (byte)2};
        private Library1 lib;
        protected Applet1(byte bArray[], short bOffset, byte bLength) throws PINException {
            lib= new Library1(tryLimit, (byte)pinBytes.length);
            lib.update(pinBytes, (short)0, (byte)pinBytes.length);
            register();
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            new Applet1(bArray, bOffset, bLength);
        public void process(APDU apdu) {
            byte status=(byte)0;
            lib.resetAndUnblock();
            if (!(lib instanceof Shareable)) status += (byte)2;
            if (!(lib instanceof MyPIN)) status += (byte)4;
            ISOException.throwIt(Util.makeShort((byte)0x90, status)); // sw indicates tries remaining
        public Shareable getShareableInterfaceObject(AID cltAID, byte parm) {
            return lib;
    }Library1:
    package com.package1;
    import javacard.framework.OwnerPIN;
    import javacard.framework.PINException;
    public class Library1 extends OwnerPIN implements Interface1{
        public Library1(byte tryLimit, byte maxPINSize) throws PINException {
            super(tryLimit, maxPINSize);
    }Interface1:
    package com.package1;
    import javacard.framework.PIN;
    import javacard.framework.Shareable;
    public interface Interface1 extends Shareable {
        boolean check(byte[] pin, short offset, byte length);
        byte getTriesRemaining();
        boolean isValidated();
        void reset();
    }Applet2:
    package com.package2;
    import javacard.framework.*;
    import com.package1;
    public class Applet2 extends Applet {
        private final static byte CLA_TEST = (byte)0x80;  
        private final static byte INS_TEST = (byte)0x20;
        private final static byte P1_AUTHORIZE = (byte)0x00;
        private final static byte P1_DOIT = (byte)0x01;
        private final static byte P1_CHECK_SIO = (byte)0x0a;
        private Interface1 sio;
        protected Applet2(byte bArray[], short bOffset, byte bLength) {
            register();
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            new Applet2(bArray, bOffset, bLength);
        public void process(APDU apdu) {
         byte[] buffer = apdu.getBuffer();
            if ((buffer[ISO7816.OFFSET_CLA] == CLA_TEST) ||
                (buffer[ISO7816.OFFSET_CLA] == ISO7816.CLA_ISO7816)) {
                short bytesReceived = apdu.setIncomingAndReceive();
                switch (buffer[ISO7816.OFFSET_INS]) {
                case ISO7816.INS_SELECT:
                    if (!JCSystem.getAID().equals(buffer, ISO7816.OFFSET_CDATA, buffer[ISO7816.OFFSET_LC]))
                        ISOException.throwIt(ISO7816.SW_APPLET_SELECT_FAILED);
                    sio = (Library1)JCSystem.getAppletShareableInterfaceObject(JCSystem.lookupAID(<fill in parameters>);
                    if (sio == null)
                        ISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);            
                    break;
                case INS_TEST:
                    switch (buffer[ISO7816.OFFSET_P1]) {
                    case P1_AUTHORIZE:
                        if (!sio.isValidated()) {
                            if(!sio.check(buffer, ISO7816.OFFSET_CDATA, buffer[ISO7816.OFFSET_LC]))
                                ISOException.throwIt(Util.makeShort((byte)0x9A, sio.getTriesRemaining()));
                        break;
                    case P1_DOIT:
                        if (!sio.isValidated())
                            ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
                        sio.reset();
                        ISOException.throwIt(Util.makeShort((byte)0x9A, sio.getTriesRemaining()));                
                        break;
                    default:
                        ISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);                   
                    break;
                default:
                    ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
            else {
                ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    }1. Upload package1
    2. Install Applet1
    3. Select Applet1
    4. Upload package2
    5. Install Applet2
    6. Select Applet2

  • How to get values from a stored package variable of type record ?

    Sir,
    In my JClient form, I need to get values from a database stored package variable of type record. And the values are retained in the JClient form for the whole session. The values are copied only once when the form is started.
    What is the best way to do that ?
    Thanks
    Stephen

    Stephen,
    not sure what your model is, but if it is Business Components, I think I would expose the properties as a client method on the application module. This way all JClient panels and frames will have access to it. You could use a HashMap to store the data in teh app module.
    If JDBC supports the record type, then you should be able to call it via a prepared SQL statement. If not, you may consider writing a PLSQL accessor to your stored procedure that returns something that can be handled.
    Steve Muench provides the following examples on his blog page
    http://otn.oracle.com/products/jdev/tips/muench/stprocnondbblock/PassUserEnteredValuesToStoredProc.zip
    http://otn.oracle.com/products/jdev/tips/muench/multilevelstproc/MultilevelStoredProcExample.zip
    Frank

  • How to set the path variable on Windows ME?

    I want to get a friend of mine to start using java the only problem is that we both dont know how to set the path variable in Windows ME. I cant seem to find any instructions on it for ME. So if someone could please tell me how or give me a llnk to directions for Windows ME. Thanks.

    Refer to the Installation Instructions for the package that you installed - I believe #5 if the instructions has the information. A link to the instructions is at the page you installed from.

  • How to refer a .jar file in the code.

    How to refer a .jar file in the code.
    I want to use a library dnsjava.jar, which I download from the internet. I want to know how to refer it
         If I am compiling the code on Solaris
         If I compiling the code on windows using eclipse.
    I added the following line in my code to refer to this library. But it always complains of not found the class
    import org.xbill.DNS.*;
    I tried the following to add this library but did not work
    On eclipse/windows: Went to window-> preferences -> BuildPath _> class path Variable.
    On Solaris: Could not add this library /opt/java_reference/v1.6.0_04/jre/lib. Although I am logged in as root, but not able to add the library there. Complains of Permission denied.

    Set the classpath option when compiling.
    javac -classpath /path/to/lib/dnsjava.jar YourProgram.java
    I don't use Eclipse, but it probably has a library list on your project preferences. Add it there.
    Regards,
    Henrique Abreu

  • Script logic - how to use a selection variable within an allocation logic

    Hi,
    I want to implement a simple top-down distribution to distribute values from a yearly budget (Y20xx.TOTAL) to a quarter budget (Q20xx.Q1, ... Q20xx.Q4) using the actuals of the previous year as reference.
    If we hard code the members it works fine:
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
    *DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
    *DIM CATEGORY WHAT=SBO; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    Of course, we want to make this dynamic, using the values inputted in the selection screen of the package: time, entity and category.
    So if we start with write the following logic, it does not work anymore:
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
    *DIM TIME WHAT=%TIME_DIM%; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
    *DIM CATEGORY WHAT=%CATEGORY_DIM%; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    So, how to use the selection variables in this allocation logic? %TIME%, %CATEGORY% also did not work ...
    regards
    Dries
    solved it ...
    Edited by: Dries Paesmans on Feb 22, 2009 8:31 PM

    Hi Dries,
    Looks like you solved this, but if I can just add a small point -- when you use syntax like this:
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN);
    *DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL);
    each time the logic runs, it will scan through the dimension from the FIN and Q2009.TOTAL members, one level at a time, until it reaches the base members (where calc = 'n'). This may happen very quickly, if the dimension has very few levels, but could take a bit of extra time if it's a particularly deep dimension. (By which I mean many levels of hierarchy -- not some 1970's Pink Floyd musical reference.)
    You may speed things up by using a member property instead of the BAS(xyz). Flag all the base members using a specific property value, and that way the logic engine can pick up the complete list of members in the WHERE clause, in a single query.
    *DIM Account What=ACC_NOT_ASSIGNED; Where=[FloydProperty]="DarkSideOfTheMoon"; ...
    This adds some maitenance work in the dimension, which may be problematic if your admins are changing it regularly (and will cause problems if they forget to update this particular property).
    I can't predict how much time this will save you (maybe not much at all), but anyway I figure you'd want to know exactly what work you're asking the system to perform.
    Regards,
    Tim

  • How to use a global variable for reading a query resultset in JDBC lookup?

    Hi Friends,
    Using JDBC lookup, I am trying to read from a table Emp1 using a user defined function. In PI 7.0, this function returns values of a single column only even if you fire a " Select * " query. I am planning to use a global variable(array) that stores individual column values of the records returned by a "select *" query. Need pointers on as to how a global variable can be declared and used to acheive the above scenario. Kindly explain with an example. Any help would be appreciated.
    Thanks,
    Amit.

    Hi Amit,
    Sounds like a good idea but then you would need an external db and update the table in a thread safe way !.
    Regarding your question as to how to work with global variable please refer https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1352. [original link is broken] [original link is broken] [original link is broken]
    Rgds
    joel

  • Package Variable Values in For Each Contaner

    I have a For Each File Container that loops through Excel files, executing a child package for each file found. I am using the RowCount transform to log the number of rows at various points in a DataFlow. When one file is processed the numbers are correct
    but when multiple files (e.g. 5) are processed some counts are zero when they shouldn't be. I have tried a 1 second sleep in the loop but that didn't fix the problem.
    R Campbell

    Please share more technical details
    numbers of what where, what Data Flaw how a package reports on the counts?
    Arthur
    MyBlog
    Twitter
    Actually, the title IS misleading.
    I have a parent package with a For Each File container
    and within that a child package is called, passing the file path and name. The child package has a
    DataFlow with quite a few branches in the flow. On some of those branches I have
    RowCount "transforms" each linked to its own
    package variable.
    At the CotrolFlow level a script is executed immediately after the DataFlow which writes the package variable values to the dts log.
    If I place one file at a time into the folder that the For Each Container is looking at and wait for it to be processed, the numbers are correct. If I place a number of files (say 5) in the folder at one time, some of the numbers logged are correct
    and some are zero.
    I did try a 1 second sleep at the start of the logging  script but, when I think about it, the package variables probably being read before the script starts to execute. If this is a timing issue (which I don't think that it should be) it might need
    to be a separate script between the DataFlow and the existing script, with a sleep in it.
    Because each loop of the parent package executes a new instance of the child package I am puzzled as to how there can be a timing issue. No matter how tight the loop might be, a new instance of the child package is executed each time.
    R Campbell

  • How can i store a variable to a file?

    for some reason i can't find much on writing to files, is
    this not possible?
    and if it isnt possible, how can i keep a variable? i don't
    want the variable to reset to 0 every time someone loads a new
    instance of the page.
    also, for some reason.. it seems to me that if statements
    dont work as they should. the vote() function always executes the
    countVote() function even if choice doesn't = ans.
    anyone know what im doing wrong
    example..
    private function vote(choice):void {
    text1.text=choice
    if (choice=ans){
    countVote();
    private function countVote():void {
    total=total+1
    totalS=total.toString();
    text2.text=totalS
    text2 displays the total count and every time i submit the
    vote, the count goes up no matter what i choose
    i also get a warning for all of the variables saying
    "1084: var 'total' will be scoped to the default namespace:
    sv1: internal. It will not be visible outside of this package."
    (sv1 is the name of the project)
    how to i make it visible outside of the package?

    In this case, the if statement will not work as you intended.
    You need to use the double-equals, ie, if (choice == ans)
    Also, the flash player is inside a sandbox for security
    reasons. Consequently, you can not write directly to files. To get
    around this, make a call to a php, python, java or .net script
    residing on the webserver that will write to a file for you. You
    can do this using the HTTPService object.

Maybe you are looking for

  • Lots of  trace file generated in udump dir at the propagation target site

    about 5 minutes per file,what can i to do to disable it? trace file sample: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options ORACLE_HOME = /oraps/product/10.2.0 System na

  • Variance for a invoice document

    Hi Experts, How to get the variance details of a parked invoice document? Is there any function module to do the same? Thanks, Navya

  • Whats the BIG secret to creating emailable HTML docs???

    Inquired at my local Apple reseller on what software is available to create an HTML newsletter or flyer - just like the ones they send out to customers. Was informed that it was possible in Entourage but this is plainly NOT the case. Can anybody help

  • Configuring Database Server to Shared Server Architecture

    Hello! Sir/Madam, Presently Our server configuration is Dedicated Server Architecture, due to number of connections opening in the dedicated server, we are shifting our server configuration to the Shared Server Archiecture. Will any One send me what

  • Developer Mode Exception encountered for item.

    Hi, After running the page I am getting following error , 1. Developer Mode Exception encountered in item CitizenId Error: The item CitizenId has a maximum length (0) which is not equal to that of the corresponding VO attribute, CitizenId length (20)