Setting a variable values only in the first time

Hi all,
I have a problem regadring PL-SQL coding..actually its something related to programming logics.
I'm calling a method (modify) from client application and which calls several other methods. (check_update and update)
method update updates the database and then calls some other method. (modify_something) That method modify_update calls check_update and and update methods.
Also i have a global variable (var_1) defined in the packages level which is used for some condition checking in update method. But unfortunatly i have to change the value of that variable in modify_something method. So the original value of the var_1 is lost.
Is there anyway to keep the original value of this variable...please dont tell that i have to stop changing the variable value in modify_something its NOT possible at any cost.
Expecting some help from PL-SQL gurus..
thanks in advance..
/garuka

Hi,
I know about the concept of scoping. The problem here is not that.
The problem is how i change a value of a variable only once when it calls for the first time and stop changing the value for the other times.
If i explain it little more its like this.
I want to change the value of the var_1 when it check_modify calls for the first time. and use if in some other methods. But var_1 is modified by some other client methods which are called by update method which is called after check_update method.
So my problem is if i use the solution samir told how i set the value to that var only once when it calls in the check_update for the first time and then to stop setting it during other method calls and within check_update method which calls recursively.
Simply do the variable assignment only in the first request only..
/garuka

Similar Messages

  • Delay on playing an instrument (only at the first time)

    Hello,
    I'm new to Mainstage and have the following problem:
    Always I open my concert, there is a small delay in all instruments in all patches. But ONLY at the first time, I play the instrument (hit the key). For the rest of the performance everything works fine ... How can I get rid of that??
    My work-around right now is, to mute the Main Audio at the soundcheck and play every instrument/patch once ... :-(
    Thanks for your support and greets from Germany
    ... Joonas

    Thanks for your answers first of all !
    At the end I found the solution looking at the Note:307167.1 on Metalink:
    Discoverer Plus 10.1.2 Fails with ORA-1017 Error On First Login Attempt Then Works On Second Attempt
    This note is very useful but into the solution the point 3 is not correct !
    3. Modify the servername parameter to indicate the fully qualified servername.domain
    Example:
    An httpd.conf setting of: ServerName my_servername.mydomain.com should match a Discoverer Plus URL like http://my_servername.mydomain.com:7778/discoverer/plus
    I had this problem both with Viewer and Plus...so instead to change the server name parameter (into the Apache/Apache/conf/httpd.conf file) with my complete URL (http://gnvdev.ote.gr:7779/discoverer/plus), I just write my right server name:
    Example
    After the installation of the Discoverer 1og server, into the httpd.conf file it was written automatyically: ServerName gnvdev
    I just modified in ServerName gnvdev.ote.gr and both Viewer and Plus started to work perfectly at the first time.
    I hope that this hint will be useful for you and others in the Discoverer forum !!!
    Best Regards
    Alex

  • Applications are mentioned free, but when we start downloading one dollar is charged in my credit card, but only for the first time when i switch on and use it for the first time one dollar is charged. and from next application it is free. why?

    Applications are mentioned free, but when we start downloading one dollar is charged in my credit card, but only for the first time when i switch on and use it for the first time one dollar is charged. and from next application it is free. why?

    Kindly inform any email id or toll free number to contact apple for your below answer, Mr.King_Penguin
    About receiving my credit card being debited for Free App Store Application downloads,
    It should be within a few days, but it might vary a bit by bank/provider :
    I am in India, if the bank don't refunds , what to do?
    Rajagopal.pngr :-  It is only a holding charge, it is not a permanent charge. If it isn't refunded within a few days or so (and it quite possibly won't be over a weekend) then you can query the charge with Apple.

  • Execute command only at the first time?

    English:
    Hi would like to take an application a particular command only at the first time run so he is no longer running for the 2nd time ! How to do that ? thanks Hollo1001
    German:
    Hallo möchte bei einer anwendung einen bestimmten befehl nur beim ersten mal ausführen so das er beim 2. mal nicht mehr ausgeführt wird! Wie macht man das? MFG Hollo1001

    use a boolean:
    var alreadyExecuted:Boolean;
    if(!alreadyExecuted){
    alreadyExecuted=true;
    // rest of once only code

  • HT201320 Setting up mail only works the first time and then fails...

    Hello,
    I own a new iPad 4.
    Setting up my own mail accounts works great for the first time (I see new mails and I can sent mails), but the second time I open the Mail-App it complains about my mail settings.
    Mails are provided from my own domain. Using other mail clients I don't have issues.
    Setting is based on IMAP ssl/port 993 and ssl/578. iPad runs on IOS6.1.
    Do you have an idea why?
    Carsten

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • Failed to connect to database ONLY at the first time

    Hi all, I installed Discoverer 10g version and I'm using an Application User to connect to the server where's the Db is installed.
    Every time I try to connect to the server with Discoverer Viewer or Desktop I have a curious behavior....
    ALWAYS but ONLY the first time I try to connect I have the following error :
    - Failed to connect to database - Unable to connect to Oracle Applications database: invalid username/password.
    If I try to re-connect again the second time it works perfectly !!....so, I think, there's nothing related with my .dbc file.
    I tried also to write the ':' at the end of the user name....but it didn't work.
    Into the pref.txt file doesn't exist a parameter like DefaultUserTypeIsApps to set....
    Anybody have had the same "strange" behavior and found a solution or workaround ?
    Thanks in advance
    Alex

    Thanks for your answers first of all !
    At the end I found the solution looking at the Note:307167.1 on Metalink:
    Discoverer Plus 10.1.2 Fails with ORA-1017 Error On First Login Attempt Then Works On Second Attempt
    This note is very useful but into the solution the point 3 is not correct !
    3. Modify the servername parameter to indicate the fully qualified servername.domain
    Example:
    An httpd.conf setting of: ServerName my_servername.mydomain.com should match a Discoverer Plus URL like http://my_servername.mydomain.com:7778/discoverer/plus
    I had this problem both with Viewer and Plus...so instead to change the server name parameter (into the Apache/Apache/conf/httpd.conf file) with my complete URL (http://gnvdev.ote.gr:7779/discoverer/plus), I just write my right server name:
    Example
    After the installation of the Discoverer 1og server, into the httpd.conf file it was written automatyically: ServerName gnvdev
    I just modified in ServerName gnvdev.ote.gr and both Viewer and Plus started to work perfectly at the first time.
    I hope that this hint will be useful for you and others in the Discoverer forum !!!
    Best Regards
    Alex

  • My AS3 buttons only work the first time

    I have set up my buttons so that are each a movieclip with 'over' and 'out' states/frame labels. They exist on the main timeline. The actionscript controlling them is situated in a frame on the main timeline and the frame holding that actionscript is on the same point within the main timeline where the buttons are introduced. I am using actionscript 3.
    The buttons have been set up so that they navigate to another frame on the same main timeline and on that frame is a movie. The movie dimensions are smaller than the main stage so the buttons are still accessible when each movie is played.
    The problem is my buttons are only working once - by that I mean they go to the correct place when clicked the first time, but when they are clicked again they navigate elsewhere.
    Totally doing my head in trying find a solution and if anyone can help and show me what I'm doing wrong that would be really really helpful. Here's the code I used for the buttons...
    stop();
    function mainBtnOver(event:MouseEvent):void {
    event.target.gotoAndPlay("over");
    function mainBtnOut(event:MouseEvent):void {
    event.target.gotoAndPlay("out");
    ///////// INDIVIDUAL BUTTON CLICK FUNCTIONS
    function mainBtn1Down(event:MouseEvent):void {
    gotoAndPlay("01Movie");
    function mainBtn2Down(event:MouseEvent):void {
    gotoAndPlay("02Movie");
    function mainBtn3Down(event:MouseEvent):void {
    gotoAndPlay("03Movie");
    function mainBtn4Down(event:MouseEvent):void {
    gotoAndPlay("04Movie");
    function mainBtn5Down(event:MouseEvent):void {
    gotoAndPlay("05Movie");
    ////////// Button 1 Listeners
    mainBtn1.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn1.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn1.addEventListener(MouseEvent.CLICK, mainBtn1Down);
    ////////// Button 2 Listeners
    mainBtn2.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn2.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn2.addEventListener(MouseEvent.CLICK, mainBtn2Down);
    ////////// Button 3 Listeners
    mainBtn3.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn3.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn3.addEventListener(MouseEvent.CLICK, mainBtn3Down);
    ////////// Button 4 Listeners
    mainBtn4.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn4.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn4.addEventListener(MouseEvent.CLICK, mainBtn4Down);
    ////////// Button 5 Listeners
    mainBtn5.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn5.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn5.addEventListener(MouseEvent.CLICK, mainBtn5Down);
    I'm sure it's me doing something very stupid - I'm very new to AS3. Any help much appreciated.
    Thanks :-)

    If the frame labels you are going to have movie clips that have your presentation content, you should use gotoAndStop("frameLabel") instead of gotoAndPlay("frameLabel"). There's no need to play the main timeline when you go to and show any of these movie clips. I'm not sure if this is your issue, though... Using your code, I had no problems.
    Also, you can set up your animated buttons in a way that eliminates the need to have your ROLL_OVER and ROLL_OUT events. This isn't necessarily better, but just another method. Although I might use other ways to animate a button, I do like to reduce the code it takes to use the buttons in an interface, and only use CLICK in most cases.

  • HTTPService.send() only works the first time

    I have the follow HTTPService defintion in my mxml page:
    <mx:HTTPService
    id="updateRequest"
    url="{accessURL}"
    useProxy="false" result="onSuccessEvent(event)"
    fault="onFailEvent(event)">
    <mx:request>
    <username>{userName}</username>
    <password>{password}</password>
    <id></id>
    <sname></sname>
    <value></value>
    <randomNum>0</randomNum>
    </mx:request>
    </mx:HTTPService>
    Here is my call:
    updateRequest.request.id= myid;
    updateRequest.request.sname= myname;
    updateRequest.request.value = myvalue;
    updateRequest.request.randomNum = Math.random();
    updateRequest.send();
    The first time call is successful, but second time(after 30
    seconds), after send() function call, I didn't even received
    HTTPService call from server side. Is this somehow cached or I need
    to reinitial it? This looks strange.

    I am having the same issue but have already been using the
    post method. When I click my refresh button or if the timer I have
    set up resets I see no request made to the server.
    private function onResult(Event:ResultEvent):void {
    var myNum:int = Math.round(Math.random() * 2);
    var xmlResult:XML = XML(Event.result);
    _xlcMyListData = new XMLListCollection(xmlResult..asset);
    <mx:HTTPService id="tempXML" resultFormat="e4x"
    result="onResult(event)" method="POST" url="
    http://mysite.net/info_wrapper.php?customer={customer.text}&amp;username={username.text}&a mp;password={password.text}"
    useProxy="false"/>
    <mx:TileList dataProvider="{_xlcMyListData}"
    labelField="fleet" left="35" right="15"
    width="350" backgroundColor="#000000" color="#ff0000"
    fontSize="27" borderColor="#000000" columnWidth="315"
    rowHeight="50" themeColor="#808080" fontWeight="bold"
    allowMultipleSelection="true" id="TileList1" height="0" y="202"
    x="178"/>
    <mx:Button label="Refresh Page Now" height="27"
    fillAlphas="[1.0, 1.0]" fillColors="[#030000, #030000, #474545,
    #474545]" borderColor="#DCDEDF" click="tempXML.send();"/>

  • I am using an airport express to stream from iTunes to my stereo.  My router is a net gear type G.  Setting up is no problem for the first time.  But, when I close iTunes then restart I have to reset (using the reset button)and reset up.  Wanna do it one?

    Using a. Airport express to stream from iTunes.  My Router is a Netgear type G.  The express sets up fine and works the first time.  When I try to use it at a later date after closing then reopening iTunes I have to physically reset the express and then go through the process of finding it again.  Is this normal? 

    I have a 3rd generation (802.11n capable, 2.4Ghz only) airport express, my problem is that I've tried using it to extend my network and that brick wall, no matter how close I get the express to the room, the signal and throughput in that room becomes abysmal.
    As you might imagine, brick is a lot like cement, and it will not allow much of the wireless signal through.
    Regarding your Express, there is no such thing as a 3rd Generation model....yet. You likely have a 1st Generation AirPort Express. Check and confirm the Model No on the side of the Express. A 1st Gen model is A1264.
    Here's my problem, I don't think the express supports "extending" a network from a wired network jack.
    The Express can "extend" wirelessly, or using an Ethernet connection. The configuration for this is very simple, but post back if you need it.
    The jack just seems to be shut off
    Have you temporarily turned off the wireless on a laptop and tried to connect it using an Ethernet cable to the wall jack as a "test"?
    If you can get a good Internet connection this way, then you know the Ethernet cabling and jack are working correctly.
    On the other hand, if you cannot get an Internet connection on the laptop during this "test", then this indicates that the Ethernet cable or jack is not functioning correctly and the wiring will need troubleshooting before you can proceed any further.
    I need to create a whole new wireless network in this room for this configuration to work?
    AirPort Setup will take care of this for you automatically during the configuration of the AirPort Express.
    If I have an apple TV connecting to the express and an AppleTV connecting to the extreme, will they both be visible when connected wirelessly to either network?
    Yes
    Will I be able to connect to my network seemlessly?
    Yes
    Post back after you have confirmed that the Ethernet cable and Ethernet jack are functioning correctly in the temporary "test" mentioned above.  Then, we will continue.

  • How do I accept the Terms and Conditions when trying to set up an Apple ID for the first time ( using my iphone)?

    I am trying to create an Apple ID by using the Itunes icon on my iphone 5s for the first time. It opens up a screen with the 54 pages of Terms and Conditions and it does not allow me to even accept the Terms and Conditions... no Accept option or place to click!
    The only option is to Send the terms and conditions via email... which also does not work...it keeps asking me to "try again"... Has someone else had this problem?

    Hello, Wyseup. 
    Thank you for visiting Apple Support Communities.
    Most likely this email address has been attempted to be setup as an Apple ID at some point.  You can reset your Apple ID password via the steps in the first article below.  If you do not have access to the email account, need assistance or are not receiving the password reset link, see the second article.
    Apple ID: If you forget your password
    http://support.apple.com/kb/ht5787
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Cheers,
    Jason H.

  • PDF only open the first time

    HI
    I have a problem with the PDF export, of any type of document; the situation is complicated in the case of documents which provide for the printing of batches of transactions. Let me give an example.
    I open a delivery customers and I click on the icon PDF: SAP opens the pdf of Transactions batch and then the standard form of delivery; simultaneously saves both pdf folder of images.
    If, once closed the pdf, I click again icon PDF (or after creating a new document), SAP only opens the transaction reports; the report of delivery is not open on the screen but is only saved in the attachments.
    In order to view again I have to close the form and reopen it.
    Is the first time that the next time, the log file I have the message "Invalid input parameter for DfltSeq", but the first time you open the pdf.
    Does anyone know help me to understand why:
    1. SAP does not reopen both reports from the second time
    2. the pdf are saved once in the path of the images, and after the path of attachments.
    Thanks
    NL

    Hi Maggie,
    can you tell me if there is something official SAP (Notes or other) with the problem and that SAP will provide a solution?
    I have the SAP 9.0 PL 14 and I do not have the problem.
    the customer have 9.0 PL 16 and has the problem.
    Thanks
    Nora

  • JLabel with HTML visible only for the first time

    I've implemented a really simple applet:
    public class TestApplet extends JApplet {
      @Override
      public void init() {
        try {
          SwingUtilities.invokeAndWait(new Runnable() {
            public void run() {
              JPanel topPanel = new JPanel();
              topPanel.setLayout(new BorderLayout());
              getContentPane().add(topPanel);
              JLabel labelHello = new JLabel("<html>Hello World!</html>");
              topPanel.add(labelHello, BorderLayout.NORTH);
              JLabel labelHelloNoHTML = new JLabel("Hello World - without html!");
              topPanel.add(labelHelloNoHTML, BorderLayout.SOUTH);
        } catch (Exception e) {
          System.err.println("Couldn't initialize GUI");
    }And there are two html pages, both having the same applet and a link referring to each other:
    index.html
    <html>
           <head><title>Applet</title></head>
           <body>
                  <div><a href="link.html">Link</a></div>
                  <div>
                        <applet hspace="0" height="375" align="left" width="600" vspace="0" mayscript="" alt="GetJava" codebase="./"
                        code="com.test.TestApplet" name="TestApplet"></applet>         
                  </div>
           </body>
    </html>link.html
    <html>
           <head><title>Applet</title></head>
           <body>
                  <div><a href="index.html">Link</a></div>
                  <div>
                        <applet hspace="0" height="375" align="left" width="600" vspace="0" mayscript="" alt="GetJava" codebase="./"
                        code="com.test.TestApplet" name="TestApplet"></applet>         
                  </div>
           </body>
    </html>Now when I navigate to index.html the applet shows correctly both labels but in case I jump to link.html the applet shows only the second label i.e. Hello World - without html! . This seems to be specific to Java version 1.6.0_21 and 1.6.0_22, it was working properly in 1.6.0_17. Is anyone else experiencing similar issue or am I missing something?
    Edited by: user13135196 on Nov 25, 2010 4:33 AM
    Edited by: Slavek Tecl on 25.11.2010 13:12

    I am having this exact same issue. I have a JLabel with <html> for superscript in my JApplet. The first time I run my applet it displays fine. All subsequent times (refresh the page, or close the tab then open again) the JLabel with <html> doesn't show. This issue does NOT occur in the Eclipse Applet Viewer, but does occur with Google Chrome9 and IE8.
    I spent forever checking my methods and changing things trying to figure out why all the other labels show. Never would have guessed <html> in a JLabel would make it not display. This is terrible bug. Please fix ASAP.

  • [Solved] DVDs and CDs only work the first time I put them in

    First lets get this straight before it is asked later on down the line. I am a 6 year Linux user and 2 year Arch user. I am currently using xfce4 and thunar as my file manager with thunar-volman installed. This has been a problem for the past year or so. I use my laptop most of the time (also Arch 64 and working like a dream) so I only try fixing it every so often to no avail.
    I can put in a CD or a DVD and play them with VLC. Here's the catch: after I eject the CD/DVD and put in another one I can't play it or find it. The first time I put one in I even get an icon on the desktop. I don't think it's reasonable to have to reboot everytime I want to play another DVD (time wasted by constant rebooting is one of the very long list of reasons I don't use Microshaft products). I'm stumped, I can't be the only one, but my forum searches yield no treasures.
    Last edited by astrozombie (2010-02-03 01:00:15)

    Thanks for trying, however, I posted what I use for a reason. I am using VLC, and I am a minimalist so I don't want a bunch of programs for doing the exact same thing. VLC is the only player for Linux that plays MTS files out of the box, so I'm not interested in switching or adding another.
    Anyways, it's irrelevant because as I said before, thunar mounts it correctly the first time I put in a DVD or CD and displays an icon on the desktop for the disk. Therefore the problem is most likely hal related, since this began about the time we switched to hotplugging, and besides this I love hotplugging so I am also not interested in disabling that (who know what problems I'll introduce for my MAC keyboard and webcam if I do that). Yes I've read the hal and dbus wikis.
    I can even get a USB CD writer to work with xfburn, however it's a relic and I think that's a sorry work around when I have internal drives that, in theory, work just fine. I wonder if it has anything to do with the drives being IDE when I used the SATA install option on the install disk (I did a fresh install last week) since my hard drives are SATA.

  • Screen suspend + gnome only works the first time

    Hi all,
    Being new here , i hope i'm posting in the right place.
    I've just installed arch i686 , everything is running like clockwork, nearly everything actually.
    i'll try to explain the problem shortly.
    i've set screensaver to start after 1minute and the screen to suspend after 2 for testing. After a boot, these settings works like a charm, moving the mouse, enter password and go on working. After that, after 1 minute idling, screensaver starts but the screen never switch off. If i open the gnome application to manage power, re-apply my settings, it will work but just the first time.
    It's not a big issue, i know that i've just have to re appply settings each time i leave or switch off monitors manually but it's a bit annoying, and i'm curious , i'd really like to solve this little problem. As i'm not a linux guru at all, i don't know where to start searching, any clue will be greatly appreciated.
    Thx in advance.
    Jojo.
    P.S.: sorry if it's a bit confused and for my english .

    Thx for your answer loafer,
    i'm still "googleing" to find a clue. I'm sure the answer is simple, one day, i ll find it.
    I'm still looking for clues anyway.
    Thx in advance.
    Jojo.

  • AutoPlay Only Works the First Time

    Our customer is getting a little annoyed by something happening with their CP4 outputs, and I'm not sure if it's "normal" or something's wrong.
    The .swf/html plays fine the first time through.  However, if a user re-accesses and launches the file again, it plays the first slide, and then jumps to the end.  We've checked our navigation and it seems to be fine (go to next slide). We removed the status flags, thinking there was some sort of cookie being set that identified this module as already been played by the user.  The problem happens whether it's being served up from a web server or played on a local machine.
    I'm taking a big hit on this.  And I don't know where else to look.
    I have to fix this..any suggestions?
    Thanks heaps.

    Hi there
    My guess is that you need to click Project > Table of Contents. Then click Settings... and ensure the Self Paced Learning option is cleared.
    If you find the option is already cleared, you might then investigate the Flash Player version.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

Maybe you are looking for