DETT: Set Cursor (Cursor ID) and Set Cursor (Icon Pict) VI Reference Leak

Hi, 
Using LV 2011 and the Desktop Execution Trace Toolkit to analyze my application, it has identified a reference link in the 2 above stated VIs. It's not a huge deal but is there any possibility I'm missing something here? Whether I use them individually or as subVIs in the Set and Unset Busy Icon VIs, it always report a reference leak. The block diagram is locked so I'm guessing there is not much I can do to correct it, but I just wanted to ask. Is this fixed in later versions? I am not calling this VI continually in a loop or anything, but I do use it quite a bit as my app is pretty user interface intensive.
Thanks,
Erin

What version of LabVIEW are you using?  For LabVIEW 7.x, there was a bug in the Cursor VIs where they would only work with a certain number of created VI windows, after which point they would start returning errors (might have been error 26, I don't recall).  This bug was fixed in LabVIEW 8.0.  If you are using LabVIEW 8.x, I'm not sure what the problem might be.
-D
Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman

Similar Messages

  • Ref Cursor over Implicit and explicit cursors

    Hi,
    In my company when writing PL/SQL procedure, everyone uses "Ref Cursor",
    But the article below, says Implicit is best , then Explicit and finally Ref Cursor..
    [http://www.oracle-base.com/forums/viewtopic.php?f=2&t=10720]
    I am bit confused by this, can any one help me to understand this?
    Thanks

    SeshuGiri wrote:
    In my company when writing PL/SQL procedure, everyone uses "Ref Cursor",
    But the article below, says Implicit is best , then Explicit and finally Ref Cursor..
    [http://www.oracle-base.com/forums/viewtopic.php?f=2&t=10720]
    I am bit confused by this, can any one help me to understand this?There is performance and there is performance...
    To explain. There is only a single type of cursor in Oracle - that is the cursor that is parsed and compiled by the SQL engine and stored in the database's shared pool. The "+client+" is then given a handle (called a SQL Statement Handle in many APIs) that it can use to reference that cursor in the SQL engine.
    The performance of this cursor is not determined by the client. It is determined by the execution plan and how much executing that cursor cost ito server resources.
    The client can be Java, Visual Basic, .Net - or a PL/SQL program. This client language (a client of SQL), has its own structures in dealing with that cursor handle received from the SQL engine.
    It can hide it from the developer all together - so that he/she does not even see that there is a statement handle. This is what implicit cursors are in PL/SQL.
    It can allow the developer to manually define the cursor structure - this is what explicit cursors, ref cursors, and DBMS_SQL cursors are in PL/SQL.
    Each of these client cursor structures provides the programmer with a different set of features to deal with SQL cursor. Explicit cursor constructs in PL/SQL do not allow for the use of dynamic SQL. Ref cursors and DBMS_SQL cursors do. Ref cursors do not allow the programmer to determine, at run-time, the structure of the SQL projection of the cursor. DBMS_SQL cursors do.
    Only ref cursors can be created in PL/SQL and then be handed over to another client (e.g. Java/VB) for processing. Etc.
    So each of the client structures/interfaces provides you with a different feature set for SQL cursors.
    Choosing implicit cursors for example does not make the SQL cursor go faster. The SQL engine does not know and does not care, what client construct you are using to deal with the SQL cursor handle it gave you. It does not matter. It does not impact its SQL cursor performance.
    But on the client side, it can matter - as your code in dealing with that SQL cursor determines how fast your interaction with that SQL cursor is. How many context switches you make. How effectively you use and re-use the SQL (e.g. hard parsing vs soft parsing vs re-using the same cursor handle). Etc.
    Is there any single client cursor construct that is better? No.
    That is an ignorant view. The client language provides a toolbox, where each tool has a specific application. The knowledgeable developer will use the right tool for the job. The idiot developer will select one tool and use it as The Hammer to "solve" all the problems.

  • Can't set temp files folder or set cache size

    I have a workstation that will not download files, or pick up the auto-proxy settings. Other workstations on the same network work fine, so it is not the user profile or proxy server/config. It happens to all users on this workstation, including the local
    admin account.
    I have reset IE settings, doesn;t fix. Downloaded and run 4 or five fix-it tools (I used Chrome or another PC to download). I have removed IE from the windows features and settings, rebooted, and added back. Windows update works, updated it to all latest
    security patches. If I go to open the downloads folder, it does nothing (Tools-View Downloads), just drops back to the normal browse window. If I try and check/set the temp files, Tools->Options->Browse and click Settings, I see there is no current temp
    file location (not even for the loacl admin). I try and set it (by moving) to C:\Users\admininstrator (%username%)\appdata\local\microsoft\windows\Temporary Internet Files\ it accepts, then asks me to log off. Log back on and it's not set. I try and set the
    Disk space to use for cache as it is set to zero, and it will ONLY accept 8MB then when I click save (close or whatever), I go back and it is still 0MB.
    I have run sfc /scannow, I have reset all user permissions on the Admin user folder.
    Sooo00, I use Google Chrome and it works fine - picks up the autoproxy, downloads, opens the download folder. I've disabled all the add-ons. If I set the proxy to autodiscovery, IE hangs and does not disply anything. If I set the proxy script, it does not
    work. If I manually set the proxy server and port, browsing is fine except it won't download files when you click on them to save, won't open pdf's.
    This all used to work until sometime over Christmas.

    Hi,
    So we are using IE 11 here? And are we in a domain environment?
    In addition, have we checked if this issue exists in
    saft mode with networking.?
    When doing the uninstallation, please first take a check to see if the previous version of IE could work with the settings mentioned above, after that, take a try to install IE 11 by manually download it from the below link:
    Download Internet Explorer 11 
    Best regards
    Michael Shao
    TechNet Community Support

  • Error message and set cursor field in subscreen

    hey ,
    i have a program with main screen 500 and many subscreens 501,502 and so own .
    when i  want to validate wrong input in a field and set message type 'E' in the PAI of the subscreen the program
    raise the message and exit from the program .
    if i try to put the message in the PBO of the subscreen it dosn't exit but after the message the program dosn't flow to
    command SET CURSOR FIELD that i wrote after the message .
    how can i solve this ?
    is there somthing that i'm missing in the basic code flow of the program ?
    ( screen 500 PBO - PAI ->  SUBSCREEN 50x PBO - PAI )
    best regards
    ASA

    hello and thanks for the answer
    let me  clarify my problem :
    i want to issue a message ( type e or i ) only if some fields are null and the user pressed on SAVE .
    when i'm in the tab-strip and writing error message in :
    PAI :
    chain.
    field XXX
    field YYY
    module issue_warning_message on chain-request.
    endchain.
    in  module issue_warning_message :  if XXX is initial --> message type E --> set cursor field XXX.
    here i get the message and cursor is set.
    when i try to post the message in without chain or any events :
    module user_command_tab502 .
    the message is issued and it exit the program if the type is e and if type message is I the cursor is not set .
    please advice
    ASA

  • Activate Tab page and set cursor on field!

    Hi All,
    I have a requirement to mimic SAP standard functionality like whenever a mandatory field is not enetered in a transaction, the control activates particular tab page and set the cursor on mandatory field.
    My requirement is as below.
    There is a main screen 1 with many tab pages.
    But when I click on save button, the control goes to different screen. When a partular field is not enetered, then I should put my control to a particular tab page and cursor on that initial field.
    Please help me to get this done. Al I think is SET SCREEN but not sure how I can eneable the control to a particular tab page and cursor on a field from the different screen.
    Many thanks.
    -Pratyusha
    Edited by: pratyushasdn on Jun 24, 2010 2:07 PM

    Hi chandrasekhar find my code below
    this code i am writing under  at selection-screen.
    *&      Form  Z_VALIDATE_TVKOV
    FORM z_validate_tvkov .
      DATA: i_vtweg LIKE vbak-vtweg.
      IF NOT s_vtweg-low IS INITIAL.
        SELECT SINGLE vtweg FROM tvkov INTO i_vtweg
                     WHERE vtweg = s_vtweg-low.
        IF sy-subrc <> 0.
        set cursor FIELD 'S_VTWEG-LOW'.
        MESSAGE e000(z_sd) WITH text-052.
        ENDIF.
       ENDIF.
      IF NOT s_vtweg-high IS INITIAL.
        SELECT SINGLE vtweg FROM tvkov INTO i_vtweg
                            WHERE vtweg = s_vtweg-high.
        IF sy-subrc <> 0.
          MESSAGE e000(z_sd) WITH text-052.
        ENDIF.
      ENDIF.
    ENDFORM.                    " Z_VALIDATE_TVKOV

  • Opening and fetching cursor.. what accually happens?

    So, if we have an explicit cursor... we open it with open c_cursor_name... and fetches it into some variable...
    my question is - what really happens when we open cursor?
    does oracle make only instance of cursor object in memory? or... does it reads some basic data about rows that are going to be fetched (rowid's?)..? or what?
    also, if we make some insert into a table that is going to be rolled over by cursor (while cursor is fetching..), should cursor read this new data? for example, what is difference if cursor roll over an indexed ID and we make an insert with an ID=10, and cursor is currently on ID=100? or opposite? (commit included in insert)...
    oh, so many questions :)
    tnx :)

    Not really. The same SQL cursor in the shared pool applies.
    The difference is on the client side. Each of the methods you've listed is essentially using a different method on the client side to interact with the cursor on the server.
    Some methods are more desirable in some cases than another - there's not a single superior method. Each has pros and cons and addresses a specific set of client coding requirements.
    There are some preferred methods though on the client. The three primary ones are:
    a) use bind variables (enables one to re-use the same SQL cursor)
    b) re-use the same client cursor handle for tight loop operations
    c) use bulk binding
    The first one is kind of obvious - as bind variables creates a cursor "program" that can be called/executed with different values. Like an INSERT cursor for example. The same SQL cursor can be used to insert a million rows, with each execution using different variable values to insert.
    The second one is not that applicable to the PL language in PL/SQL - thanks to the integration between the PL and SQL languages. In other client languages though, you want to re-use not only the same server cursor, but the same client cursor handle. As this saves you a soft parse. So instead of this approach:
    // pseudo code
    for i in 1..count
      CreateCursor( c, <sql statement> );
      BindValue( c, 1, myVariable[i] );
      ExecCursor( c );
      CloseCursor( c );
    end loop;..the following is far more efficient:
    // pseudo code
    CreateCursor( c, <sql statement> );
    for i in 1..count
      BindValue( c, 1, myVariable[i] );
      ExecCursor( c );
    end loop;
    CloseCursor( c );This approach re-uses the client handle - which means a single db parse was needed. The prior approach required a brand new parse for each loop iteration. (even soft parsing is an overhead that should be avoided where possible)
    The last primary factor is bulk processing. This is fairly well documented for the PL language - the important bit to remember that bulk processing is only intended to pass more data with a single call between the PL and SQL engines. Nothing more. The price of which is a bigger PGA memory footprint. Thus there is a balance between how much data (rows/variables) one should pass between the two versus the amount of memory that consumes.

  • Can you use a custom cursor with drag and drop?

    Hi there! I'm a newbie flash user and working on a simulation for a graduate course in instructional design. I'm using Flash Professional CC on Mac. Here's what I'm trying to do. I have several draggable sprites on the stage and three target sprites. I have specified the original x,y locations of the sprites and have set the end x,y locations as those of each of the three targets. Items must be dragged to one of the three targets.
    Some questions:
    1. Can I specify more than one End x,y location for a draggable sprite? I'm creating a lesson to teach kindergartners how to sort lunchroom waste. If they have a napkin, for example, it could either go into the compost OR into the recycling. In cases like this where an item could really be placed into more than one bin, I want them to get it right if they do either of those things, rather than forcing them to choose which one.
    2. To make my project more "fun" for kids, I wanted to customize the cursor with a graphic of  hand. When I tried this in the flash file it works perfectly until I add the drag and drop functionality for the wasted items. Then the cursor will more around  but not pick up any items. Once I revert back to the standard pointer, the correct drag and drop functionality is restored.
    3. I have it set to snap back to the original location if learner attempts to drop the item on the wrong target. I want to be able to play a sound file when that happens, as well as play a sound file when it lands on the correct target, as well as shrink the item and change its opacity so that it appears invisible. I want to give the illusion of it being placed into the bin. I have no idea as to the proper way to code these events so that they happen.
    4. I've watched dozens of hours of youtube tutorials before coming here. I'm a quick study, but am very new to action script. In one of the videos the developer showed referencing an external action script file which I don't think is an option in CC. The coding method he used seemed much more streamlined and "clean" than the chunks I'm working with now. Is there an easy way for me to code information about these objects  than the way I've got it here now? I hate starting new things with bad habits. The perils of self-teaching.
    Thanks!
    I'm pasting my code from the actions panel below so you can see what's going on:
    stop();
    /* Custom Mouse Cursor
    Replaces the default mouse cursor with the specified symbol instance.
    stage.addChild(customcursor);
    customcursor.mouseEnabled = false;
    customcursor.addEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor);
    function fl_CustomMouseCursor(event:Event)
      customcursor.x = stage.mouseX;
      customcursor.y = stage.mouseY;
    Mouse.hide();
    //To restore the default mouse pointer, uncomment the following lines:
    customcursor.removeEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor);
    stage.removeChild(customcursor);
    Mouse.show();
    //set up variables and objects for dragging
    var offset:int = 10;
    var appleStartX:int = 243;
    var appleStartY:int = 156;
    var appleEndX:int = 522;
    var appleEndY:int = 22;
    apple.buttonMode = true;
    apple.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    apple.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var cupStartX:int = 39;
    var cupStartY:int = 266;
    var cupEndX:int = 520;
    var cupEndY:int = 175;
    cup.buttonMode = true;
    cup.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    cup.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var barStartX:int = 178;
    var barStartY:int = 234;
    var barEndX:int = 522;
    var barEndY:int = 22;
    bar.buttonMode = true;
    bar.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    bar.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var orangeStartX:int = 284;
    var orangeStartY:int = 102;
    var orangeEndX:int = 522;
    var orangeEndY:int = 22;
    orange.buttonMode = true;
    orange.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    orange.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var bottleStartX:int = 172;
    var bottleStartY:int = 303;
    var bottleEndX:int = 520;
    var bottleEndY:int = 175;
    bottle.buttonMode = true;
    bottle.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    bottle.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var bananaStartX:int = 113;
    var bananaStartY:int = 123;
    var bananaEndX:int = 522;
    var bananaEndY:int = 22;
    banana.buttonMode = true;
    banana.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    banana.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var napkinStartX:int = 248;
    var napkinStartY:int = 271;
    var napkinEndX:int = 520;
    var napkinEndY:int = 175;
    napkin.buttonMode = true;
    napkin.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    napkin.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var yogurtStartX:int = 27;
    var yogurtStartY:int = 136;
    var yogurtEndX:int = 518;
    var yogurtEndY:int = 329;
    yogurt.buttonMode = true;
    yogurt.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    yogurt.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var strawberryStartX:int = 120;
    var strawberryStartY:int = 285;
    var strawberryEndX:int = 522;
    var strawberryEndY:int = 22;
    strawberry.buttonMode = true;
    strawberry.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    strawberry.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var sandwichStartX:int = 7;
    var sandwichStartY:int = 364;
    var sandwichEndX:int = 522;
    var sandwichEndY:int = 22;
    sandwich.buttonMode = true;
    sandwich.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    sandwich.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var juiceStartX:int = 88;
    var juiceStartY:int = 347;
    var juiceEndX:int = 518;
    var juiceEndY:int = 329;
    juice.buttonMode = true;
    juice.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    juice.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var foilStartX:int = 39;
    var foilStartY:int = 416;
    var foilEndX:int = 520;
    var foilEndY:int = 175;
    foil.buttonMode = true;
    foil.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    foil.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var waxbagStartX:int = 235;
    var waxbagStartY:int = 342;
    var waxbagEndX:int = 522;
    var waxbagEndY:int = 22;
    waxbag.buttonMode = true;
    waxbag.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    waxbag.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    function startDragging (e:MouseEvent) {
      e.currentTarget.startDrag();
    function stopDragging (e:MouseEvent) {
      e.currentTarget.stopDrag();
      switch (e.currentTarget) {
      case apple:
      if (apple.x < appleEndX - offset || apple.x > appleEndX + offset || apple.y < appleEndY - offset || apple.y > appleEndY + offset) {
      apple.x = appleStartX;
      apple.y = appleStartY;
      else {
      apple.x = appleEndX;
      apple.y = appleEndY;
      //checkGame();
      break;
      case sandwich:
    if (sandwich.x < sandwichEndX - offset || sandwich.x > sandwichEndX + offset || sandwich.y < sandwichEndY - offset || sandwich.y > sandwichEndY + offset) {
      sandwich.x = sandwichStartX;
      sandwich.y = sandwichStartY;
      else {
      sandwich.x = sandwichEndX;
      sandwich.y = sandwichEndY;
      //checkGame();
      break;
      case orange:
    if (orange.x < orangeEndX - offset || orange.x > orangeEndX + offset || orange.y < orangeEndY - offset || orange.y > orangeEndY + offset) {
      orange.x = orangeStartX;
      orange.y = orangeStartY;
      else {
      orange.x = orangeEndX;
      orange.y = orangeEndY;
      //checkGame();
      break;
      case strawberry:
    if (strawberry.x < strawberryEndX - offset || strawberry.x > strawberryEndX + offset || strawberry.y < strawberryEndY - offset || strawberry.y > strawberryEndY + offset) {
      strawberry.x = strawberryStartX;
      strawberry.y = strawberryStartY;
      else {
      strawberry.x = strawberryEndX;
      strawberry.y = strawberryEndY;
      //checkGame();
      break;
      case napkin:
    if (napkin.x < napkinEndX - offset || napkin.x > napkinEndX + offset || napkin.y < napkinEndY - offset || napkin.y > napkinEndY + offset) {
      napkin.x = napkinStartX;
      napkin.y = napkinStartY;
      else {
      napkin.x = napkinEndX;
      napkin.y = napkinEndY;
      //checkGame();
      break;
      case bar:
    if (bar.x < barEndX - offset || bar.x > barEndX + offset || bar.y < barEndY - offset || bar.y > barEndY + offset) {
      bar.x = barStartX;
      bar.y = barStartY;
      else {
      bar.x = barEndX;
      bar.y = barEndY;
      //checkGame();
      break;
      case juice:
    if (juice.x < juiceEndX - offset || juice.x > juiceEndX + offset || juice.y < juiceEndY - offset || juice.y > juiceEndY + offset) {
      juice.x = juiceStartX;
      juice.y = juiceStartY;
      else {
      juice.x = juiceEndX;
      juice.y = juiceEndY;
      //checkGame();
      break;
      case foil:
    if (foil.x < foilEndX - offset || foil.x > foilEndX + offset || foil.y < foilEndY - offset || foil.y > foilEndY + offset) {
      foil.x = foilStartX;
      foil.y = foilStartY;
      else {
      foil.x = foilEndX;
      foil.y = foilEndY;
      //checkGame();
      break;
      case banana:
    if (banana.x < bananaEndX - offset || banana.x > bananaEndX + offset || banana.y < bananaEndY - offset || banana.y > bananaEndY + offset) {
      banana.x = bananaStartX;
      banana.y = bananaStartY;
      else {
      banana.x = bananaEndX;
      banana.y = bananaEndY;
      //checkGame();
      break;
      case bottle:
    if (bottle.x < bottleEndX - offset || bottle.x > bottleEndX + offset || bottle.y < bottleEndY - offset || bottle.y > bottleEndY + offset) {
      bottle.x = bottleStartX;
      bottle.y = bottleStartY;
      else {
      bottle.x = bottleEndX;
      bottle.y = bottleEndY;
      //checkGame();
      break;
      case waxbag:
    if (waxbag.x < waxbagEndX - offset || waxbag.x > waxbagEndX + offset || waxbag.y < waxbagEndY - offset || waxbag.y > waxbagEndY + offset) {
      waxbag.x = waxbagStartX;
      waxbag.y = waxbagStartY;
      else {
      waxbag.x = waxbagEndX;
      waxbag.y = waxbagEndY;
      //checkGame();
      break;
      case cup:
    if (cup.x < cupEndX - offset || cup.x > cupEndX + offset || cup.y < cupEndY - offset || cup.y > cupEndY + offset) {
      cup.x = cupStartX;
      cup.y = cupStartY;
      else {
      cup.x = cupEndX;
      cup.y = cupEndY;
      //checkGame();
      break;
      case yogurt:
    if (yogurt.x < yogurtEndX - offset || yogurt.x > yogurtEndX + offset || yogurt.y < yogurtEndY - offset || yogurt.y > yogurtEndY + offset) {
      yogurt.x = yogurtStartX;
      yogurt.y = yogurtStartY;
      else {
      waxbag.x = waxbagEndX;
      waxbag.y = waxbagEndY;
      //checkGame();

    Some questions:
    1. Can I specify more than one End x,y location for a draggable sprite?
    yes, use an if-else statement
    I'm creating a lesson to teach kindergartners how to sort lunchroom waste. If they have a napkin, for example, it could either go into the compost OR into the recycling. In cases like this where an item could really be placed into more than one bin, I want them to get it right if they do either of those things, rather than forcing them to choose which one.
    2. To make my project more "fun" for kids, I wanted to customize the cursor with a graphic of  hand. When I tried this in the flash file it works perfectly until I add the drag and drop functionality for the wasted items. Then the cursor will more around  but not pick up any items. Once I revert back to the standard pointer, the correct drag and drop functionality is restored.
    assign your cursor's mouseEnabled property to false:
    yourcursor.mouseEnabled=false;
    3. I have it set to snap back to the original location if learner attempts to drop the item on the wrong target. I want to be able to play a sound file when that happens, as well as play a sound file when it lands on the correct target, as well as shrink the item and change its opacity so that it appears invisible. I want to give the illusion of it being placed into the bin. I have no idea as to the proper way to code these events so that they happen.
    use the sound class to create a sound:
    // initialize your correct sound once with
    var correctSound:Sound=new CorrectSound();  // add an mp3 sound to your library and assign it class = CorrectSound
    // apply the play() method everytime you want your sound to play:
    correctSound.play();
    // change an object's opacity:
    someobject.alpha = .3;  // partially visible
    someobject.alpha = 1;  // fully visible
    someobject.visible=false;  // not visible, at all.
    // change an object's scale
    someobject.scaleX=someobject.scaleY=.5;  // shink width and height by 2
    someobject.scaleX=someobject.scaleY=1;  // resize to original
    4. I've watched dozens of hours of youtube tutorials before coming here. I'm a quick study, but am very new to action script. In one of the videos the developer showed referencing an external action script file which I don't think is an option in CC. The coding method he used seemed much more streamlined and "clean" than the chunks I'm working with now. Is there an easy way for me to code information about these objects  than the way I've got it here now? I hate starting new things with bad habits. The perils of self-teaching.
    you could google: 
    actionscript 3 class coding
    actionscript 3 object oriented programming
    p.s.  you can simplify and streamline your coding by learning about arrays and using hitTestObject.

  • Question on Synonyms and Implicit Cursor

    Hi,
    I've two doubts.
    Question1:
    Why Oracle is allowing me to create a synonym even base object does not exist in database.
    For example in below example user ABC and object def doesnt exist in my database. Why I didnt get any error while creating a synonym.
    Connected to Oracle Database 11g Express Edition Release 11.2.0.2.0
    Connected as hr
    SQL> CREATE SYNONYM test_syn FOR ABC.def;
    Synonym created
    SQL> Question2:
    In PL/SQL after closing the cursor if we use any cursor attribute it will throw exception like invalid cursor. Why it is not happening in case of implicit cursor.
    Or
    Does Oracle close implicit cursor(SQL) ?
    declare
    begin
      UPDATE emp
      SET ename = 'SURI';
    COMMIT;
    dbms_output.put_line(SQL%rowcount);
    end;Many thanks for all your help.
    Cheers,
    Suri

    Suri wrote:
    Hi,
    I've two doubts.
    Question1:
    Why Oracle is allowing me to create a synonym even base object does not exist in database.
    For example in below example user ABC and object def doesnt exist in my database. Why I didnt get any error while creating a synonym.If you look in the all_dependencies view you will see that it's created as "NON-EXISTENT", so oracle knows it's non existent, it just doesn't treat it as an error.
    As it says in the documentation:
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_7001.htm#SQLRF01401
    A dependency is created and if the target object is changed or dropped etc. the synonym becomes invalid... but that doesn't mean it cannot exist.
    Question2:
    In PL/SQL after closing the cursor if we use any cursor attribute it will throw exception like invalid cursor. Why it is not happening in case of implicit cursor.Would you care to demonstrate what you mean with some code.

  • Using plsql table and ref cursor in oracle forms 10g

    Hi all,
    Can anyone give me an example of a scenario where we need to create a form manually based on a database stored procedures.
    And in that procedure i have created a pl/sql table and a ref cursor in data base level.
    CREATE OR REPLACE PACKAGE SCOTT.BONUS_PKG IS TYPE bonus_rec
    IS RECORD(
    empno     bonus_EMP.empno%TYPE,
    ename     bonus_EMP.ename%TYPE,
    job     bonus_EMP.job%TYPE,
    sal     bonus_EMP.sal%TYPE,
    comm     bonus_EMP.comm%TYPE);
    TYPE b_cursor IS REF CURSOR RETURN bonus_rec;
    TYPE bontab IS TABLE OF bonus_rec INDEX BY BINARY_INTEGER;
    PROCEDURE bonus_refcur(bonus_data IN OUT b_cursor);
    PROCEDURE bonus_query(bonus_data IN OUT bontab);
    END bonus_pkg;
    CREATE OR REPLACE PACKAGE BODY SCOTT.BONUS_PKG IS
    PROCEDURE bonus_query(bonus_data IN OUT bontab) IS
    ii NUMBER;
    CURSOR bonselect IS
    SELECT empno, ename, job, sal, comm FROM bonus_EMP ORDER BY empno;
    BEGIN
    OPEN bonselect;
    ii := 1;
    LOOP
    FETCH bonselect INTO
    bonus_data( ii ).empno,
    bonus_data( ii ).ename,
    bonus_data( ii ).job,
    bonus_data( ii ).sal,
    bonus_data( ii ).comm;
    EXIT WHEN bonselect%NOTFOUND;
    ii := ii + 1;
    END LOOP;
    END bonus_query;
    PROCEDURE bonus_refcur(bonus_data IN OUT b_cursor) IS
    BEGIN
    OPEN bonus_data FOR SELECT empno, ename, job, sal, comm FROM bonus_EMP ORDER BY empno;
    END bonus_refcur;
    END bonus_pkg;
    i want to populate the data in forms manually not using forms data block wizard and programmatically.
    please reply...

    Can anyone give me an example of a scenario where we need to create a form manually based on a database stored procedures.Typically, you would use a procedure based block when you have a collection of data from multiple tables presented in a Form and your user needs to be able to update the information displayed.
    From your code example, it looks like you are using Oracle Support document "Basing a Block on a Stored Procedure - Sample Code [ID 66887.1]". If this is the case, keep following the document - it walks you through all of the steps. There is no need to Manually configure things that the Data Block Wizard will perform for you!
    i want to populate the data in forms manually not using forms data block wizard and programmatically. Why? Let the Data Block Wizard take care of configuring your block based on a procedure for you. There is no need to manually loop through the data! I've actually done what you are attempting and it was more work than was needed. Let Forms do the work for you. :)
    If you absolutely must do things manually, I recommend you use the PROCEDURE bonus_query(bonus_data IN OUT bontab) instead of the bonus_refcur(bonus_data IN OUT b_cursor) . Then, in your code create a variable of type BONTAB and then call the bonus_query procedure. Then it is a simple case of looping through the table of records returned by the bonus_query procedure. For example:
    DECLARE
       t_bonus    bonus_pkb.bontab;
    BEGIN
       bonus_pkg.bonus_query(t_bonus);
       FOR i in 1 .. t_bonus.count LOOP
          :YOUR_BLOCK.EMPLOYEE_NUMBER := t_bonus(i).empno;
          :YOUR_BLOCK.EMPLOYEE_NAME := t_bonus(i).ename;
          :YOUR_BLOCK.EMPLOYEE_JOB := t_bonus(i).job;
          :YOUR_BLOCK.EMPLOYEE_SALARY := t_bonus(i).sal;
          :YOUR_BLOCK.EMPLOYEE_COMMISSION := t_bonus(i).comm;
       END LOOP;
    END;This code sample demonstrates the basics, but as it is sample code - you will have to adapt it to your situation.
    Also, I strongly recommend you look at the article InoL listed. This is a very comprehensive discussion on REF CURSORs. If you are set on using a procedure based data source - it is more efficient to pass the table of records back to your form than it is to pass a ref cursor. Using a ref cursor, you might as well just using a standard named cursor and loop through your named cursor. The effect is the same (one row returned at a time creating lots of network traffic). Using the table of records is more efficient because the entire data set is returned so network traffic is reduced.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How to change mouse cursor during drag and drop

    Hi Guys,
    Iam performing a Drag and drop from Table1(on top of the figure) to Table2(down in the figure).
    see attached figure
    http://www.upload-images.net/imagen/e80060d9d3.jpg
    Have implemented the Drag and drop functionality using "Transferable" and "TransferHandler"using the java tutorial
    http://java.sun.com/docs/books/tutorial/uiswing/examples/dnd/index.html#ExtendedDndDemo
    Now My problem is that ,I want to make the 1st column in Table2(ie: Column2-0) not to accept any drops so that the cursor appears like a "No-Drop" cursor but with selection on the column cell during a drop action.
    Also when I move my cursor between "column2-0" and "column2-1",want to to have the "No-Drop" and "Drop" cursor to appear depending on the column.
    How can I achieve it using the TransferHandle class.Dont want to go the AWT way of implementing all the source and target listeners on my own.
    Have overridded the "CanImort" as follows:
    public boolean canImport(JComponent c, DataFlavor[] flavors) {
         JTable table = (JTable)c;      
    Point p = table.getMousePosition();
    /* if(p==null)
         return false;
    int selColIndex = table.columnAtPoint(p);
    if(selColIndex==0)
         return false;*/
    If I execute the above commented code,The "No-Drop" Icon appears in "column2-0",but no cell selection.Also If I move to "column2-1",which is the 1st column,Still get the "No-Drop" Icon there,also with no cell selection.
    for (int i = 0; i < flavors.length; i++) {
    if ((DataFlavor.stringFlavor.equals(flavors))) {
    return true;
    return false;
    Thanks in advance.....
    Edited by: Kohinoor on Jan 18, 2008 3:47 PM

    If you found the selection column based on the mouse pointer, then based on the column, you can set the cursor pointer as any one as below :
    setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    setCursor(new Cursor(Cursor.HAND_CURSOR));

  • IPhone and macbook cursor issue?

    I noticed that about the same time I got my iPhone that I started having issues with the cursor on my macbook. Every so often, the cursor would start scrolling to the right all by itself, even when I was nowhere near the track pad.
    I thought my trackpad might be going bad, but then I noticed that sometimes when this happened I was also getting some GSM speaker buzz at the same time. Just a little while ago, my cursor started shaking and scrolling to the right and when I pulled my iPhone off my desk the cursor stopped.
    Could this possibly be some kind of shielding issue? I saw one or two other people post about bizarre mouse behavior when the iPhone was docked but this happens when my iPhone is undocked on my desk next to my laptop. Hopefully everyone doesn't think I am imagining things...
    Any help or thoughts would be appreciated.
    Dave

    I was having the exact same problem. Connect iPhone 3g and Canon CameraWindow would open with a notification that no camera was attached.
    I found a setting in ImageCapture which controls what happens when you connect a camera. In the preferences menu, just select none. Problem fixed.

  • Refcursor and Normal Cursor

    Hi Folks,
    As per my understanding there is no performance wise difference between the normal cursor and ref cursor the only difference is that only through the help of the refcur we can return the result set to the calling env or calling procedure.
    But in OTN site one of the excerpts from Tom I came across a statement that the refcursors can not be global means we can not declare the refcur in the package specification
    the link is http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:14188501024541
    but many times in my project we have declaree the refcursor in the package specifications also
    Can any one explain me what Tom really meant by that statement or whether I am misinterpreting the statement
    Any suggestions will be highly appreciated
    Thanks in advance
    Prafulla

    Prafulla wrote:
    Please clarify me cause I am not able to make it out properluyHere's an example - but instead of ref cursors I've used DBMS_SQL cursors. Both are "+global+" cursors - but with DBMS_SQL cursor we can see the value of the cursor handle. In other words we can "print" the value of the cursor variable, which is what we cannot do with a ref cursor. This enables one to read and understand the sample code better as we can physically see the value of that cursor pointer/handle om the example.
    The following 2 PL/SQL code units are defined:
    -- // Creates a "global" cursor and returns the cursor handle (as a number for us)
    create or replace function CreateCursor( sqlStatement varchar2 ) return number is
            c       number;
    begin
            c := DBMS_SQL.open_cursor;
            DBMS_SQL.parse(
                    c,
                    sqlStatement,
                    DBMS_SQL.native
            return( c );
    end;
    --// display the 1st column of a cursor, and we supply the cursor handle (number)
    create or replace procedure DisplayCursor( c in out number ) is
            buffer  varchar2(4000);
            rc      number;
    begin
            DBMS_SQL.define_column( c, 1, buffer, 4000 );
            DBMS_OUTPUT.put_line( '** displaying cursor '||c||' (1st column only)' );
            rc := DBMS_SQL.execute_and_fetch( c );
            loop
                    DBMS_SQL.column_value( c, 1, buffer );
                    DBMS_OUTPUT.put_line(  buffer );
                    exit when DBMS_SQL.fetch_rows( c ) = 0;
            end loop;
            DBMS_OUTPUT.put_line( '** end of cursor display' );
            DBMS_SQL.close_cursor( c );
    end;
    /We can now create a cursor, get the handle and then later from another code unit (in the same session) use that cursor handle that was created. This means that the cursor existed from the time we've opened it, until we have explicitly closed it. In other words, a global cursor that exists for the duration of our session, or until we explicitly close the the cursor handle.
    SQL> var c1 number
    SQL> var c2 number
    SQL>
    SQL> --// we open a cursor
    SQL> exec :c1 := CreateCursor( 'select object_name from user_objects where object_type =''TABLE'' and rownum <= 5' );
    PL/SQL procedure successfully completed.
    SQL> select 'Cursor '||:c1||' created.' as NOTE from dual;
    NOTE
    Cursor 710790198 created.
    SQL> --// we now open a second cursor
    SQL> exec :c2 := CreateCursor( 'select object_name from user_objects where object_type =''FUNCTION'' and rownum <= 5' );
    PL/SQL procedure successfully completed.
    SQL> select 'Cursor '||:c2||' created.' as NOTE from dual;
    NOTE
    Cursor 1228216362 created.
    SQL>
    SQL> --// we first display the 2nd cursor we've opened
    SQL> exec DisplayCursor( :c2 );
    ** displaying cursor 1228216362 (1st column only)
    CREATECURSOR
    GETTOKEN
    PLAINFOO
    SPECIALFOO
    TESTFUNC
    ** end of cursor display
    PL/SQL procedure successfully completed.
    SQL> --// we now display the 1st cursor we've opened
    SQL> exec DisplayCursor( :c1 );
    ** displaying cursor 710790198 (1st column only)
    EMPTAB
    FOOTAB
    FOOTAB_S
    TESTRAW
    TESTTAB
    ** end of cursor display
    PL/SQL procedure successfully completed.
    SQL> As you can see, these cursors are global. We create them using one unit of code. We use them via another unit of code. However, we cannot pass the DBMS_SQL handle (the number above) to our client session (e.g. Java, TOAD or SQL*Plus). We need to pass a ref cursor handle to such a client and not a DBMS_SQL handle. This allows our DisplayCursor() procedure we did in PL/SQL, to be written in client code like Java. Where the only difference is that this code will receive a ref cursor data type to process and not a DBMS_SQL cursor type.

  • Open and closed cursor

    I have some doubts/questions .
    What is the difference between open and closed cursor?
    Are library cache locks same as parse locks?
    What is the difference between latch and mutex?
    I would be grateful if experts could answer these questions.
    Regards

    Almost correct. The terminology is however nor correct.
    Simplistically:
    The SQL engine receives a SQL. It attempts a soft parse first. This means looking for an existing cursor in the Shared Pool with the same SQL. This existing cursor can be in use by other sessions. It does not matter - if that cursor is in used (opend by other sessions), or not. It may not be in use at all and simply sitting there in the cache. If such a cursor is found, it is used for that session's SQL - and that session gets a cursor handle (reference/pointer) to that existing cursor.
    If the SQL engine does not find an existing cursor to use, it needs to create a brand new cursor in the Shared Pool. This is a hard parse. Again, the session receives a cursor handle for that new cursor created.
    And that is it.
    You now need to decide how to use that cursor handle. The cursor itself is a program. You have a handle to execute that cursor program. Via its bind interface you can input data to this cursor program. Then execute it and receive (fetch) output of that cursor program.
    So the ideal is to re-use the cursor handle again and again.
    Basic example: the following is not optimal as the same cursor is opened and closed, opened and closed, for each read from the file. A lot of soft parsing results.
    while not-eof( filehandle )   // read data from a file
      read file data into var1, var2
      open cursor for 'insert into testtab values( :1, :2)'   // create a cursor
      bind cursor :1 = var, :2 = var2  // bind values to cursor (for insert)
      exec cursor // do SQL insert
      close cursor 
    end whileThis is a lot better. A single cursor is used and executed again and again:
    open cursor for 'insert into testtab values( :1, :2)'   // create a cursor
    while not-eof( filehandle )   // read data from a file
      read file data into var1, var2
      bind cursor :1 = var, :2 = var2  // bind values to cursor (for insert)
      exec cursor // do SQL insert
    end while
    close cursor  In this case a single soft/hard parse - and the client uses that cursor handle to execute that cursor (insert data) program again and again.

  • Problem with generating xml and nested cursor (ora-600)

    I have a problem with generating xml (with dbms_xmlquery or xmlgen) and nested cursors.
    When I execute the following command, I get a ORA-600 error:
    select dbms_xmlquery.getxml('select mst_id
    , mst_source
    , cursor(select per.*
    , cursor(select ftm_fdf_number
    , ftm_value
    from t_feature_master
    where ftm_mstr_id = pers_master_id ) as features
    from t_person per
    where pers_master_id = mst_id ) as persons
    from f_master
    where mst_id = 3059435')
    from dual;
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: ORA-00600: internal error code, arguments: [kokbnp2], [1731], [], [], [], [], [], []
    </ERROR>
    The problem is the second cursor (t_feature_master).
    I want to generate this:
    <master>
    <..>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    </master>
    If i execute the select-statement in sql-plus, then I get the next result.
    MST_ID MST_SOURCE PERSONS
    3059435 GG CURSOR STATEMENT : 3
    CURSOR STATEMENT : 3
    PERS_MASTER_ID PERS_TITLE PERS_INITI PERS_FIRSTNAME PERS_MIDDL PERS_LASTNAME
    3059435 W. Name
    CURSOR STATEMENT : 15
    FTM_FDF_NUMBER FTM_VALUE
    1 [email protected]
    10 ....
    I use Oracle 8.1.7.4 with Oracle XDK v9.2.0.5.0.
    Is this a bug and do somebody know a workaround?

    Very simple...Drop all type objects and nested tables and create them again. You will get no error. I'll explain the reason later.

  • Difference between Implicit and Explicit Cursors

    Hi All,
    Can you just tell me what is the difference between implicit and explicit cursor?
    Thanks,
    Padma

    Hi ,
    Implicit Cursor means ,the cursors which are defined impplicitly.Here we use curosr variables as "SQL%found,sql%not found,sql%is open.."
    but explicit cursors defined by us like if u create a cursor C1 then
    c1%found,c1% not found ,c1%open
    Thank you.

Maybe you are looking for

  • ALE Vendor payments with clearing

    Hi We are on ECC 6.0 and using FIDCC2 msg type to ALE vendor open items ( without clearing) to cenntral system for payments.  We need to get back the payment info back to the de-central system with clearing of the original vendor invoice.  We are cur

  • I have 3.4 years of ABAP experience. Planning to learn SAP BI and Move to BI. Kindly Suggest

    Hi Experts, I have been working for almost 3 and half years on SAP ABAP. Now i am planning to Learn SAP BI/BW and move my carrier to SAP BI/BW Completely. What would be the opportunities and carrier growth in the coming years for this combination. Pl

  • Abap 703 trial - can't configure web dynpro to work - reverting back to 702

    Hi there whatever I do I can't get Web dynpro to work in ABAP 703 trial -- WDY compiles etc - but always get IE explorer cannot find page when I try and run the WDY, -- I've activated all the SICF services and done the profile changes (RZ10) but stil

  • For the apex-team : bug in apex ???

    Hi apex-team, if i make a master-detail report i can choose between a result of two pages (master and detailmaster with mru for the detail) , or a result with three pages (master, detailmaster with a report of detailtabel and a form for the detail-ta

  • Lightroom CC and latest Camera Raw plug-in

    Does a subscription to the new Lightroom CC include installation of the latest Camera Raw plug-in (version 9.0?)?