Passing Record Variable through Packages

I have a question and hope that someone can help me to find the solution.
I'm developing an application and I need to pass values form one procedure PR in package B to a function FN in package A. The why I try to go is passing the values by using a variable of record type.
I have defined in both packages the same record structure that I also use in the declarations of procedure and function. I first compiled successfully the package A but when I try to compile the package B I get a compilation error:
PLS-00306: wrong number or types of arguments in call to 'B.FN'
It looks like the parameter definition or reference gets lost.
Here below a very schematic example of my application:
create or replace package A is
type Rec1 is record
( rf1 T.f1%type,
rf2 T.f2%type,
rf3 T.f3%type)
function FN ( Par in Rec1 ) return boolean;
end;
create or replace package A is
function FN ( Par in Rec1 ) return boolean is
V_ret boolean;
begin
whatever it does
return V_ret ;
end;
end;
create or replace package B is
type Rec1 is record
( rf1 T.f1%type,
rf2 T.f2%type,
rf3 T.f3%type)
procedure PR ( Par in Rec1 ) return boolean;
end;
create or replace package B is
procedure PR ( Par in Rec1 ) is
VP Rec1;
V_go boolean;
begin
VP.rf1:= something_1;
VP.rf2:= something;
VP.rf3:= something;
V_go:=FN ( VP ); <= here the compiler complaints
whatever it does
end;
end;
Many thanks for a quick answer.

Okay I didn't notice the error message text in the body of the paragraph above.
PS. If I specify singularly the fields in the parameter list I pass the compilation
but I would like to use a record variable as one.Did you see my post where I always reference the record variable in package A?
create or replace package B is
procedure PR ( Par in A.Rec1 ) return boolean;
end;
create or replace package B is
procedure PR ( Par in A.Rec1 ) is
VP A.Rec1;
V_go boolean;
begin
VP.rf1:= something_1;
VP.rf2:= something;
VP.rf3:= something;
V_go:=A.FN ( VP ); <= here the compiler complaintsIt should work.

Similar Messages

  • Passing Script variable to Package variable, ultimately used as fileName

    Following an excellent post by Geplaatst door Joost, I put together a script which SHOULD populate a package variable, then use that variable as a file name.
    The Script code is as follows:
    public class ScriptMain : UserComponent
    string iScriptVar;
    public override void PreExecute()
    base.PreExecute();
    public override void PostExecute()
    base.PostExecute();
    Variables.ExtractName = iScriptVar.ToString();
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    if (!Row.CUSIP_IsNull)
    iScriptVar = Row.CUSIP.ToString();
    A Windows message box (put in as debug, but removed for brevity here) shows the correct value is being set to iScriptVar at all points it was inserted.
    The "ExtractName" variable is checked as a ReadWriteVariables for the Script properties.
    But, the "ExtractName" package variable is not being passed to the Expressions for the FlatFile Connection properties, which is set to:  @[User::ExtractName].
    Where have I gone wrong?

    Why not to provide the link to the post already?
    iScriptVar
    is a local to script variable this explains why it did not you need the full wiring
    e.g.
    Dts.Variables["User::iScriptVar"].Value = iScriptVar
    Arthur
    MyBlog
    Twitter

  • Passing FORM variables through CFSET

    I am writing an account creation page for my site. After the
    user inputs the required information, I would like to 1. confirm
    that their email is not a duplicate of another user 2. Pass them
    off to another page that allows them to confirm the information
    that they input and submit the info to the database. I would like
    to have the email confirmed on that page through passing the
    FORM.email variable to the #CGI.SCRIPT_NAME#. If the RecordCount on
    the query for duplicate email addresses comes back VALUE=0, use
    CFLOCATION to pass to the next page with the FORM variables intact.
    However, as forms can only have one action attribute, what is the
    best way to do this, in your opinion?
    Thanks so much for your help!
    dan

    use session var to store form data:
    - user submits form.
    - form posts to same page (to itself).
    - check for duplicate email
    - if no duplicate found, copy form to a sesion var and
    cflocate to next
    page; if duplicate found show error to user
    - on next page display user-submitted data from the session
    var
    make sure session vars are enabled in cf administrator and
    sessionmanagement is enabled in your appliction.cfm/cfc
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Passing an variable through classes on init

    i have a main class
    this class starts up another class
    so iv got 3 classes
    class1
    -load class2
    class2
    -load class3
    class3
    maxslots = 0
    now that maxslots variable i want to set up from the VERY first class1
    but i cant see how you pass it thought the classes so its loaded when each class is started up
    class class1{
         private static      class2 class2x= null;
      public static void main(String[] args) throws IOException {
              class2x= new class2(7);
    }ok so my class 2 now has 7
    public class class2 implements Runnable {
            int maxSlots = 0;
            static class3 class3x= new class3(maxSlots);
         public class2(int maxSlotsx) {
              maxSlots = maxSlotsx
    public class class3{
            int maxSlots = 0;
         public class3(int maxSlotsx) {
                    maxSlots = maxSlotsx
              System.out.println("maxSlots"+maxSlots);
    }now in class 2 i CANT place the set up class3 thing within class2 constructor because its runnable and only want it done ONCE
    any idea how to pass var 7 down to my end class3
    thanks :)

    ah i worked it out lol

  • Passing jsp variable through a link

    hi everybody!!
    can anyone help me? i am in great trouble. Here is my problem description....
    I have one jsp page named a1.jsp in this page i have some checkbox in a form. an html link.
    I select a checkbox and when i click the link then onclick() event of the link execute the javascript function and take the value of the checkbox in a variable.
    I want to take the value to the page a2.jsp when i click the link.
    Please help me!!
    Here is my sample code............
    this is the code of a1.jsp page
    when i click the link named(click the link below i ) i want to go to page a2.jsp by taking the script variable a;
    <script>
    var a=" ";     
    function submitForm()
    a="shakil";
    </script>
    <a href="a2.jsp" onClick="submitForm();">Click the  link</a>_______________________________________________________

    hi,
    a1.jsp
    <script>
    var a=" ";     
    function submitForm()
         a="shakil";
    window.top.location.href ="./a2.jsp?a="+ a;
    </script>
    Click the linka2.jsp
    hello: <%=request.getParameter ( "a" ) %>

  • Passing 2 varibles through a URL

    I don't know how to pass 2 variables through a URL. I am
    familiar with ASP
    but it doesn't work the same. Please help
    <cflocation
    url="payment.cfm?username=#FORM.username#&email="#FORM.email#"">
    Wally Kolcz
    Developer / Support

    It looks like you've got an extra set of quotes:
    Take out the double quotes around #FORM.email#
    I think that will solve the problem you are having with them
    not showing up in the hidden form fields as well.

  • Pass Diadem Parameters through command line

    Hi,
    I am trying to run DIAdem through command line. I have no problem with this but can I pass a variable through the same.
    I would like to pass T1 with some value through command line. Can anyone please help me how can I do this.
    Expecting your earliest reply.
    Thanks,
    Priya

    Hi Priya,
    I am not quite sure what you're trying to do. So are you running a DIAdem SCRIPT from the command line? Is your variable defined within your application? How is the variable initialized when you run the script from within DIAdem. Is it a user Input? Also how exactly are your running the script from the command line?
    I hope to hear from you soon and I will post as soon as I get some info from you side. Thank you for your patience.
    SijinK
    National Instruments

  • How to pass attribute values through variables in JSP  Custom TagLib

    Hi,
    Can anybody help me how to pass values through varuables in the jsp custom tag.
    i am using JSP custom tag. I am unable to pass attribute values through variables.
    <invitation:invdetails invid="<%=invid%>"/> The value is passing as <%=invid%> ,not value of the invid.
    But i am getting throuh the fllowing
    <invitation:invdetails invid='1' />
    Please anybody suggest me how to pass value by using the variable.

    Hi,
    It sounds like you need to set the <rtexprvalue> tag to true in the TLD for your tag. If you do this the tag will read in the value you are trying to pass to it.
    dapanther...

  • Accessing a packaged variable through db link

    How do I access a packaged variable remotely? (Syntax)

    You cannot do that:
    SQL> conn xx/xx@xx
    Connected.
    SQL> create package p is
      2   a number;
      3  end;
      4  /
    Package created.
    SQL> conn yy/yy@yy
    Connected.
    SQL> desc p@yy
    SQL> set serveroutput on
    SQL> create synonym p1 for p@xx;
    Synonym created.
    SQL> desc p1;
    SQL> begin
      2    p1.a := 1;
      3    dbms_output.put_line(p.a);
      4  end;
      5  /
      p1.a := 1;
    ERROR at line 2:
    ORA-06550: line 2, column 6:
    PLS-00512: Implementation Restriction: 'P1.A': Cannot directly access remote package variable or cursor
    ORA-06550: line 2, column 3:
    PL/SQL: Statement ignoredInstead you should access these variables via functions and/or procedures. In following example I've created the private variable in package p but this doesn't matter whether it is private or public.
    SQL> conn xx/xx@xx
    SQL> create or replace package p is
    2 procedure set_a (v in number);
    3 function get_a return number;
    4 end;
    5 /
    Package created.
    SQL> ed
    Wrote file afiedt.buf
    1 create or replace package body p is
    2 a number;
    3 procedure set_a (v in number) is
    4 begin
    5 a := v;
    6 end;
    7 function get_a return number is
    8 begin
    9 return a;
    10 end;
    11* end;
    SQL> /
    Package body created.
    SQL> conn yy/yy@yy
    Connected.
    SQL> set serveroutput on
    SQL> desc p1
    FUNCTION GET_A RETURNS NUMBER
    PROCEDURE SET_A
    Argument Name Type In/Out Default?
    V NUMBER IN
    SQL> ed
    Wrote file afiedt.buf
    1 begin
    2 p1.set_a(1);
    3 dbms_output.put_line(p1.get_a);
    4* end;
    SQL> /
    1
    PL/SQL procedure successfully completed.
    Gints Plivna
    http://www.gplivna.eu

  • How do i pass a variable in flex

    i've been looking all over google for how to pass a variable yet
    i've come up empty handed
    i have a C code and as3
    i've never been able to get a C program to compile on my own, this is from a tutorial im trying to understand about raycasting
    from what i can gather i think that the variables are passed threw this
    #######raycaster.c##########
    AS3_Val loop( void* self, AS3_Val args )
        AS3_ArrayValue(args,"IntType,IntType,IntType,IntType",&K_UP,&K_DOWN,&K_LEFT,&K_RIGHT);
        CastRay();
        int opos,j,i,jpos;
        for(j=0; j < resY; j++ ){
            jpos = resX*j;
            for(i=0; i < resX; i++ ){
                opos = (jpos+i);
                tBuffer[opos] = buffer[i][j];
            }//end of for
        }//end of for
        return 0;
    }//end of loop
    however not one of the values inside of AS3_ArrayValue is to be found on the Main.as
    this is the only function that comunicates with the C code, but i could be wrong
    ####Main.as######
            private function enterFrame(event:Event):void {
                alcRCLib.loop(upKey,downKey,leftKey,rightKey);
                alchemyMemory.position=alcScreenBufferPointer;
                screenBitmapData.setPixels(screenBitmapData.rect,alchemyMemory);
    the reason i want to do this, other than to know how, because that would be useful above all else, i've already written a as3 that comunicates with php
    to get a array of images  for a topdown game, and i wouldn't know how to load these variables to C from a HTTP request but if i can get flash to tell c what they are then every thing worked out
    heres both codes in full
    #####Main.as####
    *Alchemy Ray Caster
    *April 6, 2010
    *Bruce Jawn
    *http://bruce-lab.blogspot.com
    *Copyright (c) <2010> <Bruce Jawn>
    *This software is released under the MIT License
    *<http://www.opensource.org/licenses/mit-license.php>
    package {
    //    import cmodule.Ray_Caster._worldMap;
    //    import cmodule.Ray_Caster._worldMap;
        import cmodule.Ray_Caster.CLibInit;
    //    import cmodule.Ray_Caster.TextFieldI;
        import flash.display.*;
        import flash.text.*;
        import flash.events.*;
        import flash.geom.*;
        import flash.text.engine.TextBlock;
        import flash.text.engine.TextLine;
        import flash.text.TextField;
        import flash.utils.*;
        import flash.ui.*;
        [SWF(width="840", height="880")]
        public class Main extends Sprite {
            [Embed(source="../wolftex/barrel.png")]
            public static var barrelClass:Class;
            [Embed(source="../wolftex/bluestone.png")]
            public static var bluestoneClass:Class;
            [Embed(source="../wolftex/colorstone.png")]
            public static var colorstoneClass:Class;
            [Embed(source="../wolftex/eagle.png")]
            public static var eagleClass:Class;
            [Embed(source="../wolftex/greenlight.png")]
            public static var greenlightClass:Class;
            [Embed(source="../wolftex/greystone.png")]
            public static var greystoneClass:Class;
            [Embed(source="../wolftex/mossy.png")]
            public static var mossyClass:Class;
            [Embed(source="../wolftex/pillar.png")]
            public static var pillarClass:Class;
            [Embed(source="../wolftex/purplestone.png")]
            public static var purplestoneClass:Class;
            [Embed(source="../wolftex/redbrick.png")]
            public static var redbrickClass:Class;
            [Embed(source="../wolftex/wood.png")]
            public static var woodClass:Class;
            //Array to hold all the textures
            private var texs:Array=[];
            private var worldMap:Array = [];
            //private var worldMap[1]:Array=[];
            private static const SCREEN_WIDTH:int=640;
            private static const SCREEN_HEIGHT:int=480;
            private var screenBitmapData:BitmapData;
            private var screenBitmap:Bitmap;
            private var alchemyMemory:ByteArray;
            private var alcRCLib:Object;
            private var cLibInit:CLibInit;
            private var alcScreenBufferPointer:uint;
            private var alcTexPointer:uint;
            private var upKey:int=0;
            private var downKey:int=0;
            private var leftKey:int=0;
            private var rightKey:int=0;
            private var a:flash.text.TextField;
            public function Main() {
                stage.frameRate=60;
                stage.align=StageAlign.TOP_LEFT;
                stage.scaleMode=StageScaleMode.NO_SCALE;
                stage.fullScreenSourceRect=new Rectangle(0,0,SCREEN_WIDTH,SCREEN_HEIGHT);
                init();
                }//end of function Main
            private function init():void {
                initBitmaps();
                initAlchemy();
                initRendering();
            }//end of function init
            private function initBitmaps():void {
                texs.push(prepareBitmapData(new eagleClass().bitmapData  ));
                texs.push(prepareBitmapData(new redbrickClass().bitmapData  ));
                texs.push(prepareBitmapData(new purplestoneClass().bitmapData  ));
                texs.push(prepareBitmapData(new greystoneClass().bitmapData  ));
                texs.push(prepareBitmapData(new bluestoneClass().bitmapData  ));
                texs.push(prepareBitmapData(new mossyClass().bitmapData  ));
                texs.push(prepareBitmapData(new woodClass().bitmapData  ));
                texs.push(prepareBitmapData(new colorstoneClass().bitmapData  ));
                texs.push(prepareBitmapData(new barrelClass().bitmapData  ));
                texs.push(prepareBitmapData(new pillarClass().bitmapData  ));
                texs.push(prepareBitmapData(new greenlightClass().bitmapData  ));
                screenBitmapData=new BitmapData(SCREEN_WIDTH,SCREEN_HEIGHT,false,0);
                screenBitmap=new Bitmap(screenBitmapData);
                addChild(screenBitmap);
                worldMap[1] = (1,2,3,4);
                worldMap[2] = (1,2,3,4);
                worldMap[3] = (1,2,3,4);
                worldMap[4] = (1,2,3,4);
                worldMap[5] = (1,2,3,4);
                worldMap[6] = (1,2,3,4);
                worldMap[7] = (1,2,3,4);
                }//end of function initBitmaps
            //Prepare the bitmap once to take into account the lower-endianess of the alchemy code.
            private function prepareBitmapData(sourceMap:BitmapData):BitmapData {
                var outBitmapData:BitmapData=sourceMap.clone();
                outBitmapData=new BitmapData(outBitmapData.width,outBitmapData.height,true,0xFF000000);
                outBitmapData.copyChannel(sourceMap,outBitmapData.rect,outBitmapData.rect.topLeft,BitmapD ataChannel.ALPHA,BitmapDataChannel.BLUE);
                outBitmapData.copyChannel(sourceMap,outBitmapData.rect,outBitmapData.rect.topLeft,BitmapD ataChannel.RED,BitmapDataChannel.GREEN);
                outBitmapData.copyChannel(sourceMap,outBitmapData.rect,outBitmapData.rect.topLeft,BitmapD ataChannel.GREEN,BitmapDataChannel.RED);
                outBitmapData.copyChannel(sourceMap,outBitmapData.rect,outBitmapData.rect.topLeft,BitmapD ataChannel.BLUE,BitmapDataChannel.ALPHA);
                return outBitmapData;
            }//end of function prepareBitmapData
            private function initAlchemy():void {
                cLibInit=new CLibInit  ;
                alcRCLib=cLibInit.init();
                //Retrieve the "Alchemy Memory".
                var ns:Namespace=new Namespace("cmodule.Ray_Caster");
                alchemyMemory=ns::gstate.ds;
                //Allocate the buffers in Alchemy.
                alcScreenBufferPointer=alcRCLib.initializeScreenBuffer(SCREEN_WIDTH,SCREEN_HEIGHT);//Setu p a screenbuffer of size x,y;
                //Copy the textures to alchemy memory.
                for (var i:int=0; i<11; i++) {
                    var ba:ByteArray=texs[i].getPixels(texs[i].rect);
                    alcTexPointer=alcRCLib.initializeTexBuffer(i);
                    alchemyMemory.position=alcTexPointer;
                    alchemyMemory.writeBytes(ba,0,ba.length);
                }//end of for
            }//end of function initAlchemy
            private function initRendering():void {
                stage.addEventListener(KeyboardEvent.KEY_DOWN,key_pressed);
                stage.addEventListener(KeyboardEvent.KEY_UP,key_released);
                addEventListener(Event.ENTER_FRAME,enterFrame);
            }//end of function initRendering
            private function enterFrame(event:Event):void {
                alcRCLib.loop(upKey,downKey,leftKey,rightKey);
                alchemyMemory.position=alcScreenBufferPointer;
                screenBitmapData.setPixels(screenBitmapData.rect,alchemyMemory);
                }//end of function enterFrame
            private function key_pressed(e:KeyboardEvent):void {
                switch (e.keyCode) {
                    case Keyboard.UP :
                        upKey=1;
                        break;
                    case Keyboard.DOWN :
                        downKey=1;
                        break;
                    case Keyboard.LEFT :
                        leftKey=1;
                        break;
                    case Keyboard.RIGHT :
                        rightKey=1;
                        break;
                }//end of switch
                }//end of function key_pressed
            private function key_released(e:KeyboardEvent):void {
                switch (e.keyCode) {
                    case Keyboard.UP :
                        upKey=0;
                        break;
                    case Keyboard.DOWN :
                        downKey=0;
                        break;
                    case Keyboard.LEFT :
                        leftKey=0;
                        break;
                    case Keyboard.RIGHT :
                        rightKey=0;
                        break;               
                        }//end of switch
                }//end of function key_released
                }//end of class
    }//end of package
    ###raycaster####
    //Raycasting Engine from Lode's Computer Graphics Tutorial
    //http://www.student.kuleuven.be/~m0216922/CG/raycasting.html
    //Modified for Alchemy by Bruce Jawn
    //http://bruce-lab.blogspot.com
    #include "AS3.h"
    #include <math.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    //============================================================
    //============================================================
    enum bool {false=0,true=!false};
    #define screenWidth 1640
    #define screenHeight 1480
    #define texWidth 64
    #define texHeight 64
    #define mapWidth 24
    #define mapHeight 24
    //1D Screen Buffer
    int* tBuffer;
    int resX = 0;
    int resY = 0;
    //2D Screen Buffer
    int buffer[screenWidth][screenHeight];
    //1D Zbuffer
    double ZBuffer[screenWidth];
    //============================================================
    //============================================================
    //textures
    int texture[11][texWidth*texHeight];
    #define numSprites 19
    //arrays used to sort the sprites
    int spriteOrder[numSprites];
    double spriteDistance[numSprites];
    struct SSprite
      double x;
      double y;
      int texture;
    struct SSprite sprite[numSprites]=
      //green light in front of playerstart
      {20.5, 11.5, 10},
      //green lights in every room
      {18.5,4.5, 10},
      {10.0,4.5, 10},
      {10.0,12.5,10},
      {3.5, 6.5, 10},
      {3.5, 20.5,10},
      {3.5, 14.5,10},
      {14.5,20.5,10},
      //row of pillars in front of wall: fisheye test
      {18.5, 10.5, 9},
      {18.5, 11.5, 9},
      {18.5, 12.5, 9},
      //some barrels around the map
      {21.5, 1.5, 8},
      {15.5, 1.5, 8},
      {16.0, 1.8, 8},
      {16.2, 1.2, 8},
      {3.5,  2.5, 8},
      {9.5, 15.5, 8},
      {10.0, 15.1,8},
      {10.5, 15.8,8},
    //============================================================
    //============================================================
    //map
    int worldMap[mapWidth][mapHeight] =
      {8,8,8,8,8,8,8,8,8,8,8,4,4,6,4,4,6,4,6,4,4,4,6,4},
      {8,0,0,0,0,0,0,0,0,0,8,4,0,0,0,0,0,0,0,0,0,0,0,4},
      {8,0,3,3,0,0,0,0,0,8,8,4,0,0,0,0,0,0,0,0,0,0,0,6},
      {8,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6},
      {8,0,3,3,0,0,0,0,0,8,8,4,0,0,0,0,0,0,0,0,0,0,0,4},
      {8,0,0,0,0,0,0,0,0,0,8,4,0,0,0,0,0,6,6,6,0,6,4,6},
      {8,8,8,8,0,8,8,8,8,8,8,4,4,4,4,4,4,6,0,0,0,0,0,6},
      {7,7,7,7,0,7,7,7,7,0,8,0,8,0,8,0,8,4,0,4,0,6,0,6},
      {7,7,0,0,0,0,0,0,7,8,0,8,0,8,0,8,8,6,0,0,0,0,0,6},
      {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,6,0,0,0,0,0,4},
      {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,6,0,6,0,6,0,6},
      {7,7,0,0,0,0,0,0,7,8,0,8,0,8,0,8,8,6,4,6,0,6,6,6},
      {7,7,7,7,0,7,7,7,7,8,8,4,0,6,8,4,8,3,3,3,0,3,3,3},
      {2,2,2,2,0,2,2,2,2,4,6,4,0,0,6,0,6,3,0,0,0,0,0,3},
      {2,2,0,0,0,0,0,2,2,4,0,0,0,0,0,0,4,3,0,0,0,0,0,3},
      {2,0,0,0,0,0,0,0,2,4,0,0,0,0,0,0,4,3,0,0,0,0,0,3},
      {1,0,0,0,0,0,0,0,1,4,4,4,4,4,6,0,6,3,3,0,0,0,3,3},
      {2,0,0,0,0,0,0,0,2,2,2,1,2,2,2,6,6,0,0,5,0,5,0,5},
      {2,2,0,0,0,0,0,2,2,2,0,0,0,2,2,0,5,0,5,0,0,0,5,5},
      {2,0,0,0,0,0,0,0,2,0,0,0,0,0,2,5,0,5,0,5,0,5,0,5},
      {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5},
      {2,0,0,0,0,0,0,0,2,0,0,0,0,0,2,5,0,5,0,5,0,5,0,5},
      {2,2,0,0,0,0,0,2,2,2,0,0,0,2,2,0,5,0,5,0,0,0,5,5},
      {2,2,2,2,1,2,2,2,2,2,2,1,2,2,2,5,5,5,5,5,5,5,5,5}
    //============================================================
    //============================================================
    double posX = 22.0, posY = 11.5; //x and y start position
    double dirX = -1.0, dirY = 0.0; //initial direction vector
    double planeX = 0.0, planeY = 0.66; //the 2d raycaster version of camera plane
    int K_LEFT=0;
    int K_RIGHT=0;
    int K_UP=0;
    int K_DOWN=0;
    //speed modifiers
    double moveSpeed =  .30; //the constant value is in squares/second
    double rotSpeed =   .20; //the constant value is in radians/second
    //============================================================
    //============================================================
    AS3_Val initializeScreenBuffer(void* self, AS3_Val args)
        AS3_ArrayValue(args, "IntType, IntType", &resX, &resY);
        tBuffer = malloc( resX * resY * sizeof(int) );
        return AS3_Ptr( tBuffer );
    }//end of initializeScreenBuffer
    //used to load some textures & sprite textures
    AS3_Val initializeTexBuffer(void* self, AS3_Val args)
        int index;
        AS3_ArrayValue(args, "IntType", &index);
        return AS3_Ptr( texture[index] );
    }//end of initializeTexBuffer
    //start the main loop
    AS3_Val loop( void* self, AS3_Val args )
        AS3_ArrayValue(args,"IntType,IntType,IntType,IntType",&K_UP,&K_DOWN,&K_LEFT,&K_RIGHT);
        CastRay();
        int opos,j,i,jpos;
        for(j=0; j < resY; j++ ){
            jpos = resX*j;
            for(i=0; i < resX; i++ ){
                opos = (jpos+i);
                tBuffer[opos] = buffer[i][j];
            }//end of for
        }//end of for
        return 0;
    }//end of loop
    int main()
        AS3_Val initializeScreenBufferMethod = AS3_Function( NULL,initializeScreenBuffer );
        AS3_Val loopMethod = AS3_Function( NULL,loop );
        AS3_Val initializeTexBufferMethod = AS3_Function( NULL,initializeTexBuffer );
        AS3_Val result = AS3_Object("initializeScreenBuffer:AS3ValType,loop:AS3ValType,initializeTexBuffer:AS3ValT ype"
                                    ,initializeScreenBufferMethod,loopMethod,initializeTexBufferMethod);
        AS3_Release( initializeScreenBufferMethod );
        AS3_Release( loopMethod );
        AS3_Release( initializeTexBufferMethod );
        AS3_LibInit( result );
        return 0;
    }//end of main
    //================================================================
    //================================================================
    void CastRay()
        printf ("Hello World!\n");
        int x;
        int y;
        int w=screenWidth;
        int h=screenHeight;
        for( x = 0; x < screenWidth; x++) for( y = 0; y < screenHeight; y++) {buffer[x][y] = 0;} //clear the buffer instead of cls()
        for(x = 0; x < w; x++)
          //calculate ray position and direction
          double cameraX = 2 * x / (double)(w) - 1; //x-coordinate in camera space    
          double rayPosX = posX;
          double rayPosY = posY;
          double rayDirX = dirX + planeX * cameraX;
          double rayDirY = dirY + planeY * cameraX;
          //which box of the map we're in 
          int mapX = (int)(rayPosX);
          int mapY = (int)(rayPosY);
          //length of ray from current position to next x or y-side
          double sideDistX;
          double sideDistY;
          //length of ray from one x or y-side to next x or y-side
          double deltaDistX = sqrt(1 + (rayDirY * rayDirY) / (rayDirX * rayDirX));
          double deltaDistY = sqrt(1 + (rayDirX * rayDirX) / (rayDirY * rayDirY));
          double perpWallDist;
          //what direction to step in x or y-direction (either +1 or -1)
          int stepX;
          int stepY;
          int hit = 0; //was there a wall hit?
          int side; //was a NS or a EW wall hit?
          //calculate step and initial sideDist
          if (rayDirX < 0)
            stepX = -1;
            sideDistX = (rayPosX - mapX) * deltaDistX;
          }//end of if (rayDirX < 0)
          else
            stepX = 1;
            sideDistX = (mapX + 1.0 - rayPosX) * deltaDistX;
          }//end of else
          if (rayDirY < 0)
            stepY = -1;
            sideDistY = (rayPosY - mapY) * deltaDistY;
          }//end of if (rayDirY < 0)
          else
            stepY = 1;
            sideDistY = (mapY + 1.0 - rayPosY) * deltaDistY;
          }//end of else
          //perform DDA
          while (hit == 0)
            //jump to next map square, OR in x-direction, OR in y-direction
            if (sideDistX < sideDistY)
              sideDistX += deltaDistX;
              mapX += stepX;
              side = 0;
            }//end of if (sideDistX < sideDistY)
            else
              sideDistY += deltaDistY;
              mapY += stepY;
              side = 1;
            }//end of else
            //Check if ray has hit a wall      
            if (worldMap[mapX][mapY] > 0) hit = 1;
          }//end of while (hit == 0)
          //Calculate distance of perpendicular ray (oblique distance will give fisheye effect!)   
          if (side == 0) perpWallDist = fabs((mapX - rayPosX + (1 - stepX) / 2) / rayDirX);
          else       perpWallDist = fabs((mapY - rayPosY + (1 - stepY) / 2) / rayDirY);
          //Calculate height of line to draw on screen      
          int lineHeight = abs((int)(h / perpWallDist));
          //calculate lowest and highest pixel to fill in current stripe
          int drawStart = -lineHeight / 2 + h / 2;
          if(drawStart < 0) drawStart = 0;
          int drawEnd = lineHeight / 2 + h / 2;
          if(drawEnd >= h) drawEnd = h - 1;
          //texturing calculations
          int texNum = worldMap[mapX][mapY] - 1; //1 subtracted from it so that texture 0 can be used!
          //calculate value of wallX
          double wallX; //where exactly the wall was hit
          if (side == 1) wallX = rayPosX + ((mapY - rayPosY + (1 - stepY) / 2) / rayDirY) * rayDirX;
          else       wallX = rayPosY + ((mapX - rayPosX + (1 - stepX) / 2) / rayDirX) * rayDirY;
          wallX -= floor((wallX));
          //x coordinate on the texture
          int texX = (int)(wallX * (double)(texWidth));
          if(side == 0 && rayDirX > 0) texX = texWidth - texX - 1;
          if(side == 1 && rayDirY < 0) texX = texWidth - texX - 1;
          int y;
          for(y = drawStart; y < drawEnd; y++)
            int d = y * 256 - h * 128 + lineHeight * 128; //256 and 128 factors to avoid floats
            int texY = ((d * texHeight) / lineHeight) / 256;
            int color = texture[texNum][texWidth * texY + texX];
            //make color darker for y-sides: R, G and B byte each divided through two with a "shift" and an "and"
            if(side == 1) color = (color >> 1) & 8355711;
            buffer[x][y] = color;
          }//end of for(y = drawStart; y < drawEnd; y++)
          //SET THE ZBUFFER FOR THE SPRITE CASTING
          ZBuffer[x] = perpWallDist; //perpendicular distance is used
          //FLOOR CASTING
          double floorXWall, floorYWall; //x, y position of the floor texel at the bottom of the wall
          //4 different wall directions possible
          if(side == 0 && rayDirX > 0)
            floorXWall = mapX;
            floorYWall = mapY + wallX;
          }//end of if(side == 0 && rayDirX > 0)
          else if(side == 0 && rayDirX < 0)
            floorXWall = mapX + 1.0;
            floorYWall = mapY + wallX;
          }//end of else if(side == 0 && rayDirX < 0)
          else if(side == 1 && rayDirY > 0)
            floorXWall = mapX + wallX;
            floorYWall = mapY;
          }//end of else if(side == 1 && rayDirY > 0)
          else
            floorXWall = mapX + wallX;
            floorYWall = mapY + 1.0;
          }//end of else
          double distWall, distPlayer, currentDist;
          distWall = perpWallDist;
          distPlayer = 0.0;
          if (drawEnd < 0) drawEnd = h; //becomes < 0 when the integer overflows
          //draw the floor from drawEnd to the bottom of the screen
          for(y = drawEnd + 1; y < h; y++)
            currentDist = h / (2.0 * y - h); //you could make a small lookup table for this instead
            double weight = (currentDist - distPlayer) / (distWall - distPlayer);
            double currentFloorX = weight * floorXWall + (1.0 - weight) * posX;
            double currentFloorY = weight * floorYWall + (1.0 - weight) * posY;
            int floorTexX, floorTexY;
            floorTexX = (int)(currentFloorX * texWidth) % texWidth;
            floorTexY = (int)(currentFloorY * texHeight) % texHeight;
            //floor
            buffer[x][y] = (texture[3][texWidth * floorTexY + floorTexX] >> 1) & 8355711;
            //ceiling (symmetrical!)
            buffer[x][h - y] = texture[6][texWidth * floorTexY + floorTexX];
          }//end of for(y = drawEnd + 1; y < h; y++)
        }//end of for(x = 0; x < w; x++)
        //SPRITE CASTING
        //sort sprites from far to close
        int i;
        for(i = 0; i < numSprites; i++)
          spriteOrder[i] = i;
          spriteDistance[i] = ((posX - sprite[i].x) * (posX - sprite[i].x) + (posY - sprite[i].y) * (posY - sprite[i].y)); //sqrt not taken, unneeded
        }//end of for(i = 0; i < numSprites; i++)
        combSort(spriteOrder, spriteDistance, numSprites);
        //after sorting the sprites, do the projection and draw them
        for(i = 0; i < numSprites; i++)
          //translate sprite position to relative to camera
          double spriteX = sprite[spriteOrder[i]].x - posX;
          double spriteY = sprite[spriteOrder[i]].y - posY;
          //transform sprite with the inverse camera matrix
          // [ planeX   dirX ] -1                                       [ dirY      -dirX ]
          // [               ]       =  1/(planeX*dirY-dirX*planeY) *   [                 ]
          // [ planeY   dirY ]                                          [ -planeY  planeX ]
          double invDet = 1.0 / (planeX * dirY - dirX * planeY); //required for correct matrix multiplication
          double transformX = invDet * (dirY * spriteX - dirX * spriteY);
          double transformY = invDet * (-planeY * spriteX + planeX * spriteY); //this is actually the depth inside the screen, that what Z is in 3D      
          int spriteScreenX = (int)((w / 2) * (1 + transformX / transformY));
          //parameters for scaling and moving the sprites
          #define uDiv 1
          #define vDiv 1
          #define vMove 0.0
          int vMoveScreen = (int)(vMove / transformY);
          //calculate height of the sprite on screen
          int spriteHeight = abs((int)(h / (transformY))) / vDiv; //using "transformY" instead of the real distance prevents fisheye
          //calculate lowest and highest pixel to fill in current stripe
          int drawStartY = -spriteHeight / 2 + h / 2 + vMoveScreen;
          if(drawStartY < 0) drawStartY = 0;
          int drawEndY = spriteHeight / 2 + h / 2 + vMoveScreen;
          if(drawEndY >= h) drawEndY = h - 1;
          //calculate width of the sprite
          int spriteWidth = abs( (int) (h / (transformY))) / uDiv;
          int drawStartX = -spriteWidth / 2 + spriteScreenX;
          if(drawStartX < 0) drawStartX = 0;
          int drawEndX = spriteWidth / 2 + spriteScreenX;
          if(drawEndX >= w) drawEndX = w - 1;
          //loop through every vertical stripe of the sprite on screen
          int stripe;
          for(stripe = drawStartX; stripe < drawEndX; stripe++)
            int texX = (int)(256 * (stripe - (-spriteWidth / 2 + spriteScreenX)) * texWidth / spriteWidth) / 256;
            //the conditions in the if are:
            //1) it's in front of camera plane so you don't see things behind you
            //2) it's on the screen (left)
            //3) it's on the screen (right)
            //4) ZBuffer, with perpendicular distance
            int y;
            if(transformY > 0 && stripe > 0 && stripe < w && transformY < ZBuffer[stripe])
            for(y = drawStartY; y < drawEndY; y++) //for every pixel of the current stripe
              int d = (y-vMoveScreen) * 256 - h * 128 + spriteHeight * 128; //256 and 128 factors to avoid floats
              int texY = ((d * texHeight) / spriteHeight) / 256;
              unsigned int color = texture[sprite[spriteOrder[i]].texture][texWidth * texY + texX]; //get current color from the texture//??????????????????
              if((color & 0x00FFFFFF) != 0) buffer[stripe][y] = color; //paint pixel if it isn't black, black is the invisible color
            }//end of for(y = drawStartY; y < drawEndY; y++)
          }//end of for(stripe = drawStartX; stripe < drawEndX; stripe++)
        }//end of for(i = 0; i < numSprites; i++)
        //readKeys
        //move forward if no wall in front of you
        if (K_UP)
          if(worldMap[(int)(posX + dirX * moveSpeed)][(int)(posY)] == false) posX += dirX * moveSpeed;
          if(worldMap[(int)(posX)][(int)(posY + dirY * moveSpeed)] == false) posY += dirY * moveSpeed;
        }//end of if (K_UP)
        //move backwards if no wall behind you
        if (K_DOWN)
          if(worldMap[(int)(posX - dirX * moveSpeed)][(int)(posY)] == false) posX -= dirX * moveSpeed;
          if(worldMap[(int)(posX)][(int)(posY - dirY * moveSpeed)] == false) posY -= dirY * moveSpeed;
        }//end of if (K_DOWN)
        //rotate to the right
        if (K_RIGHT)
          //both camera direction and camera plane must be rotated
          double oldDirX = dirX;
          dirX = dirX * cos(-rotSpeed) - dirY * sin(-rotSpeed);
          dirY = oldDirX * sin(-rotSpeed) + dirY * cos(-rotSpeed);
          double oldPlaneX = planeX;
          planeX = planeX * cos(-rotSpeed) - planeY * sin(-rotSpeed);
          planeY = oldPlaneX * sin(-rotSpeed) + planeY * cos(-rotSpeed);
        }//end of if (K_RIGHT)
        //rotate to the left
        if (K_LEFT)
          //both camera direction and camera plane must be rotated
          double oldDirX = dirX;
          dirX = dirX * cos(rotSpeed) - dirY * sin(rotSpeed);
          dirY = oldDirX * sin(rotSpeed) + dirY * cos(rotSpeed);
          double oldPlaneX = planeX;
          planeX = planeX * cos(rotSpeed) - planeY * sin(rotSpeed);
          planeY = oldPlaneX * sin(rotSpeed) + planeY * cos(rotSpeed);
        }//end of if (K_LEFT)
    }//end of CastRay
    //sort algorithm
    void combSort(int* order, double* dist, int amount)
      int gap = amount;
      enum bool swapped = false;
      while(gap > 1 || swapped)
        //shrink factor 1.3
        gap = (gap * 10) / 13;
        if(gap == 9 || gap == 10) gap = 11;
        if (gap < 1) gap = 1;
        swapped = false;
        int i;
        for (i = 0; i < amount - gap; i++)
          int j = i + gap;
          if (dist[i] < dist[j])
            double disttemp=dist[i];
            dist[i]=dist[j];
            dist[j]=disttemp;
            int ordertemp=order[i];
            order[i]=order[j];
            order[j]=ordertemp;
            swapped = true;
          }//end of if (dist[i] < dist[j])
        }//end of for (i = 0; i < amount - gap; i++)
      }//end of while(gap > 1 || swapped)
    }//end of combSort
    the sorce file can be found here http://bruce-lab.blogspot.com/2010/04/alchemy-ray-casting-engine-source-code.html

    RadioactiveLizard, you need adobe alchemy (http://labs.adobe.com/technologies/alchemy/) to compile the C code to a swc,
    not pass variables to C directly.

  • && Substitution Variable in Package Body using SQL Developer

    Hi Folks,
    I've moved over to working to in SQL Developer (its a very early version - 1.0.0) from a combination of SQL*Plus command line and a text editor. I'm trying to get this upgrgraded, but I think the question will be the same with a newer version anyway.
    I am creating a package, and in the package body I have some &&my_var substitutions that I was previoulsy prompted for when calling the .sql from the command line SQL*Plus. I need this as the variable needs to be different for the development and live environment.
    When working in SQL Developer, I can load the package body from Connection->Packages->My Package->My Package Body, and click the edit button to edit the code, however, when I click the Compile button in the top of the window my code error's because of the substituion variablle. An example is:
    CREATE OR REPLACE
    PACKAGE BODY MY_PACKAGE AS
    PROCEDURE MY_PROCEDURE
    BEGIN
    my_variable := &&my_function_from_live_or_dev_database
    END MY_PROCEDURE
    Can anyone tell me if there is a way of defining a compiler variable within the IDE widow while editing a package body stored in the database, without manually copying the code into the Worksheet and running it as a script?
    Thanks,
    AM

    953104 wrote:
    Thanks for the reply, the code was just quickly typed to show the sort of thing I am doing, it wasn't actual code form my project.
    I've come from a C background so what I would have done would be create a #define and changed to when on live or development - or passed the variable to the build environment from the IDE or makefiles and the change would have reflected through my whole project.
    What I want to be able to do is alter a definition of some sort that will reflect throughout my whole project, so I can change it in one location to minimize code changes before going live. I don't really want to be prompted at all. On one system it needs to be DEV_10 and on the other it needs to be LIVE_10.Is there a possibility to elimiante this difference at all?
    For example if DEV_10 is the oracle schemauser on the development database and LIVE_10 would be the one on the production system. THen you could just remove all references to the schema from your code.
    IF you are already connected to this schema, then you don't need to specify the schema name anymore.
    example
    instead of
    create or replace package dev_10.myPackage
    ...you can simply use
    create or replace package myPackage
    ...If needed you can alter the cuurently connected user just before you run the script.
    alter session set current_schema = LIVE10;
    create or replace package myPackage
    ...This would be a different working window in the developer (script worksheet, instead of direct pl/sql editor).
    Substitution variables are allowed there.

  • Create record variable that refers dynamic query assigned to a ref cursor?

    Hi ,
    Just explaining what I am trying to achieve:
    1) i have a hr.departments table that was loaded in hr schema on 1st oct 2012 with 4 columns(department_id, department_name, manager_id, location_id)
    2) now I have a new schema by my name 'rahul' and I have loaded departments table but now an additional column has come into picture,ie created_date, this table got loaded on 1st-Nov-2012
    3) Now going forward my columns could be dropped from the departments table (it can be a case), for example might be my departments table in my schema 'rahul' one day could comprise of only 3 columns(department_id,department_name,manager_id)
    4) Now in the next step, I have managed to extract common column names(in a single line where columns are delimited using a comma) from both the tables(hr.departments and rahul.departments) which are (department_id, department_name, manager_id, location_id) using all_tab_cols table and I have written a function for it which i will be pasting below.
    5) now going forward, using the above column names line with column names delimited using comma, I have used a ref cursor and assigned a query to it using the line of columns that I have extracted from the above point
    6) Now I want to create a record variable which refers to my ref cursor, something like we do when we create a record variable by reffering to an explicit cursor defination that we give in the declaration block.
    PS:
    1) I have been out of touch with plsql for a long time so I have lost a lot of mmeory regarding plsql.
    2) basically I need to compare data in hr.departments table with rahul.departments table for only columns that are common to both the tables, rest new or discarded columns information will go in one of the log tables that I have created(this is done already)
    Please help me, I did try searching on google for the same but it really confused me very badly, any kind of help is appreciated, please find my code below:
    Regards
    Rahul
    Code :
    ===================================================================================================
    create or replace procedure p_compare_data(fp_old_table_name in varchar2, fp_new_table_name in varchar2)
    is
    type ref_cursor_old_table is ref cursor;
    v_ref_cursor_old_table ref_cursor_old_table;
    --record_v_ref_cursor_old_table v_ref_cursor_old_table;
    --record_ref_cursor_old_table v_ref_cursor_old_table%ROWTYPE;
    Lv_all_column_names varchar2(2000);
    function f_fetch_common_column_names(fp_old_table_name in varchar2, fp_new_table_name in varchar2)
    return varchar2
    is
              Lv_all_column_names varchar2(2000);
    begin
              execute immediate 'select ltrim(all_column_names,'','') all_column_names_in_line from (select * from (select sys_connect_by_path(hr_e_column_name,'','') all_column_names from (select hr_e_column_name, rownum curr, rownum - 1 prev from (select hr_e.* , rahul_e.* , case when (hr_e_column_name = rahul_e_column_name) then 1 when (rahul_e_column_name is NULL) then 2 when (hr_e_column_name is NULL) then 3 end decision from (select column_name hr_e_column_name from all_tab_cols where owner ='''||substr(fp_old_table_name,1,instr(fp_old_table_name,'.',1,1)-1)||''' and table_name = '''||substr(fp_old_table_name,instr(fp_old_table_name,'.',1,1)+1)||''') hr_e full outer join (select column_name rahul_e_column_name from all_tab_cols where owner = '''||substr(fp_new_table_name,1,instr(fp_new_table_name,'.',1,1)-1)||''' and table_name = '''||substr(fp_new_table_name,instr(fp_new_table_name,'.',1,1)+1)||''') rahul_e on hr_e.hr_e_column_name = rahul_e.rahul_e_column_name) decision_table where decision = 1) a start with a.curr = 1 connect by prior curr = prev) b order by length(b.all_column_names) desc) all_column_names_in_line where rownum = 1' into Lv_all_column_names;
              return (Lv_all_column_names);
    end;
    begin
         Lv_all_column_names := f_fetch_common_column_names(fp_old_table_name, fp_new_table_name);
         --dbms_output.put_line(Lv_all_column_names);
         open v_ref_cursor_old_table for ('select '||Lv_all_column_names||' from '||fp_old_table_name);
    end;
    =====================================================================================================

    >
    6) Now I want to create a record variable which refers to my ref cursor, something like we do when we create a record variable by reffering to an explicit cursor defination that we give in the declaration block.
    >
    This thread is basically nothing more than a continuation of your original thread except now you are finally explaining what you are really trying to do.
    Re: passing table name to a procedure and then need to open a cursor ..
    In that original thread you said you found the solution
    >
    Well Mate thanks for your suggestion but I got it working through ref cusror, thanks for your time.
    >
    So I ask you to post your 'solution' and when you finally did it was clear that you hadn't solved anything at all. Your solution used a ref cursor all right but the code relied on a record ('record_employees') that was based on a table name ('employees') that was declared within the procedure. There isn't much point in passing in a table name if you have to hard-code the table name in the procedure.
    create or replace procedure p_ref_cursor(fp_old_table in varchar2)
    is
    type ref_cursor is REF CURSOR;
    v_ref_cursor ref_cursor;
    record_employees hr.employees%ROWTYPE;
    begin
    open v_ref_cursor for 'select * from '||fp_old_table;
    loop
    fetch v_ref_cursor into record_employees;
    exit when v_ref_cursor%NOTFOUND;
    dbms_output.put_line(record_employees.employee_id);
    end loop;
    end;Then sb92075 ask you the question that illustrates what I just said
    >
    what happens when you pass in "HR.DEPARTMENTS" ; besides throwing errors?
    >
    And you blew him off with this
    >
    Mate, departments never came in my context, in my prior message I explained what I was trying to achieve ... so I dont know what problem you are understanding reading my posts.
    >
    And now here you are asking how to get this to work for the departments table.
    It is very difficult to help someone that won't tell us what it is they are really trying to do so we can try to suggest some better ways of doing it. Hopefully, in the future, you wil start by explaining your problems instead of focusing on the solution you think you should use.
    Back to the issue -
    The first thing you should do is finish defining the requirements. Assuming the above actually works to identify columns that have different data what are you going to do with that information?
    1. Do you need to save that different data from TABLE1 somewhere?
    2. If you don't save it how will anyone look at it to decide which table has the correct data?
    3. If you do save it how will you save it 'generically' since other tables will have different columns and datatypes?
    4. What about the data from the same record in TABLE2; do you need to save that data somewhere?
    5. Will these two tables have primary keys? Are they on the same columns in each table? If not what if TABLE1 has one record but there are TWO records in TABLE2 that are identical. Is that a match? Or is that a problem because TABLE2 has an extra record even though the record is identical?
    In short detecting the differences is just one small part of the entire problem. You also need to save those differences somewhere so someone can examine the data and decide what action to take. That is the more difficult part of trying to implement a 'generic' solution.
    But now that we know what you are really trying to do take a read through this thread from 6 years ago. It has three different ways to pass a query to a procedure and get different output. You may want to save a copy of the thread since it has some very advanced techniques in it.
    How to pipeline a function with a dynamic number of columns?
    See ascheffer's reply Posted: May 9, 2006 4:53 AM for using data cartridge functionality with a pipelined function.
    See Kamal's reply Posted: May 10, 2006 4:49 AM - it shows how to get XML output.
    See BluShadow's reply Posted: Mar 27, 2009 1:50 AM - for using dynamic sql

  • Passing Record type parameter from one session to other session

    Hi,
    I have a package.procedure, in that I am calling custom workflow, inside this workflow again I am calling
    same package.procedure (Its an recursive call)
    I need to pass record type parameter in this package.procedure.
    I tried with global variables but Workflow starts its new session so it losses all variables.
    Now I am going with creation of Custom table.
    Please advice, is there any way other than creation of Custom table.
    I mean can we pass Record type parameter from one session to other session without creating table.
    Regards
    Rohit

    Al-Salamu Alikum We Rahmatu Allah We Barakatu...
    want this place from to be passed as a parameter to the shipping bill form..... using web.show_documentwhy don't u think of just passing data parameter or global parameters from one form to another
    Pass global variable between two forms.
    Hope this helps...
    Regards,
    Abdetu...

  • Passing Session variable of DATE data type to opaque view filter

    Hi Everyone,
    Can you guys please help me in passing session variable of DATE data type in RPD's physical layer 'opaque view' filter for Oracle database
    I tried following syntax, syntax wise I didn't got getting any error, but at the same time this opaque view is not fetching any records as well. my session variable is "END_DATE" and its value is 1998/12/31:00:00:00(as shown in RPD session windows, datatype is DATETIME)
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TIME_ID =TO_DATE( 'VALUEOF(NQ_SESSION.END_DATE)','MM/DD/YYYY')
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TIME_ID = TO_DATE( 'VALUEOF(NQ_SESSION."END_DATE")','MM/DD/YYYY')
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TRUNC(TIME_ID) = TO_DATE( 'VALUEOF(NQ_SESSION."END_DATE")','MM/DD/YYYY')
    In past, I was able to pass a session variable into a opaque view filter using DATEOF function, but that was in DB2.
    I appreciate your time and help

    Finally, I got right format. here it is
    to_date(substr('valueof(NQ_SESSION.END_DATE)',1,10), 'yyyy-mm-dd')
    and here is the source from where I got this information
    Using OBIEE Session Variables in Select Tables in the Physical Layer

  • How to pass javascript variable to jsp function

    i want to check which table header (that is <th> in html )is clicked and based on that a jsp funtion do a query in database and should show records in sorted way according to which column head is clicked.
    Table is created in html.
    My function is
    Vector varray = workcaseid.getWorkcaseId(Long.parseLong(MasterAccountNumber),SelectedColumn);
    <table border="1">
              <th ><label onClick="<%SelectedColumn="workcase_id";%>">Workcase Id</label></th>
              <th><label onClick="<%SelectedColumn="status_id";%>">Status</label></th>
    <tr><td>etc</td></tr>
    </table>

    im using bean for business login, following mvc model,and i think mvc is one of good design practice to use.
    <jsp:useBean id="workcaseid" scope="session"class="beanFiles.SearchWorkcaseId" />
    varray = workcaseid.getWorkcaseId(Long.parseLong(MasterAccountNumber),SelectedColumn);
    just tell me whether it is possible to pass javascript variable to jsp variable or not.i can do it by using hidden input type,using form and submit button.

Maybe you are looking for

  • Can't see new added columns in Report 6i

    Hi everyone, I have added new columns to my report, but when I print the report, those new columns are not printed in the paper. Can anyone please help me to solve this issue?

  • Windows 7 and classpnp.sys safe mode loop.

    Hello, First of all this is an outline to the system I am running. Acer Aspire X1800 Brought as a Windows Vista Home Premium 32bit, has now been upgraded to the equivalent in Windows 7. Intel® Core™2 Quad processor NVIDIA® GeForce® 7100 and nForce® 6

  • Shutting down unexpectedly, battery disconnecting

    I got back to my apartment from a break and after starting up my macbook the battery wouldn't charge. It had over 900 cycles so no big deal I bought a replacement. I got the replacement in today, installed it, and let it charge for a few hours. Now w

  • My archived photo dvd causes iphoto 6.0.6 to quit. Help!

    Hi all, I finally decided to try to tame my iPhoto collection tonight. So I burned 2gb to DVD (TDK). This all went very smoothly. I figured I was set. Except... when I view the disc in iPhoto the programme quits as I'm scolling down the images. Every

  • Seeking schematic for 683029-501 Motherboard. Is this available or am I dreaming I can get this?

    Seeking schematic for 683029-501 Motherboard. Is this available or am I dreaming to get ahold of this? Installed new power receptacle and applied power....machine still dead. Suspect reversed polarity voltage made its way past plug receptacle electro