Error #1009 on a table

Hi, I have a new problem with my code and I can't identify the problem so easily. I try to push all hero statistics in a table (heroStats). I call the heroParty of the object that contains all the object currently hero within the party. The error is the most common, a #1009. Its explain anything and im sitting here guessing what is wrong with my code. My track work perfectly. Here's all the code.

package Code {}

import flash.display.MovieClip;

Combat/public class extends MovieClip {}

public var heroStats:Array = [];

public var heroContener:Array;

public var monsterStats:Array;

public var monsterContener:Array;

public void Combat (party: Array, monsterParty:Array) {}

var pa: Array = part;

var mpa:Array = monsterParty;

Tower (Party monsterParty);

}

private void turn (heroParty:Array, monsterParty:Array) {}

for (var i: int = 0; i < heroParty.length - 1; i ++) {}

trace (heroParty [i] .getHeroInfo ("+ [i] +" "));

heroStats.push (heroParty [i] .getHeroInfo ("+ [i] +" "));

heroContener.push (heroStats);

trace (heroContener [i]);

}

}

}

}

I add '[=', in heroContener and its debugging by its own.

Tags: Adobe Animate

Similar Questions

  • Error #1009 - puzzled on what to do

    I need help here. I have a script with a movieclip with a two buttons inside. This work then it would look like she stayed pressed until you click again to simulate a multiple-choice questionnaire. Pressing on the buttons send the table a little nudge. If the table reached 4, it must stop and all that. Problem is that it works pretty well if you press it, but wont stay down longer and me drops with error 1009.

    in any case, here's the code:

    script.jpg

    Any kind of help would be greatly appreciated because it is basically my final.

    1009 error indicates that one of the objects targeted by your code are out of reach.  This may mean that the object...

    -is declared but not instantiated

    n ' is not have an instance name (or the name of the instance is misspelled)

    n ' is not in the frame where this code tries to talk to her

    -is animated in place, but is not assigned the name of the instances of each keyframe for her

    -is one of the two or more consecutive keyframes of the same objects without a name assigned in the image previous (s).

    If you go to your section to publish the Flash settings and select permit debugging option, your error message should have a suite of line number the number of the frame that will help you to isolate the object that is involved.

  • Need help with Error #1009

    Hello, I am working on a Flash game where you navigate in different rooms. Each room is located in a frame on the main timeline. I get an error message #1009 when I navigate to certain parts, but each image almost the same code, so I don't know why some executives encounter this problem while others are very well. When the error message that I am always directed to the 'room' I clicked on, but all the buttons in this room disappear and you are then stuck there and having to restart the project. I looked through other forums where people had this error message similar but I could not find a solution that could help me, so I apologize for the display of such a common problem! Here is a screenshot of the error message I get, which says:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    at project1_fla::MainTimeline/frame4() [project1_fla. MainTimeline::frame4:43]

    at flash.display::MovieClip/gotoAndStop()

    at project1_fla::MainTimeline/enterElevator3() [project1_fla. MainTimeline::frame12:25]

    errormessage.png

    Here are links to the screenshots of the debugging session where it points to the lines of code that contains the error and also screenshots of my code in these pictures:

    Frame error 4 part 1

    Frame error 4 part 2

    Frame error 12 part 1

    Frame error 12 part 2

    Code for chassis 4 part 1

    Code for chassis 4 part 2

    Code 4 room 3

    Code for chassis 4 part 4

    Code for frame 12 part 1

    Code for frame 12 part 2

    Frame 4 is labeled as 'elevator' and armature 12 is "medEntrance". I know that the problem is to jump from an image to the image, but I honestly have no idea what would be the error. I double checked all my code and it must be correct, and what makes it even more confusing, is that some rooms work perfectly while others have this problem and they all use the exact code, but with different names of MC! :/ Something I noticed is that the rooms which are most often linked to (for example that the lift can bind to three different "floors" or frames) are those who encounter this problem. But I chose this pair in particular because it contains the least amount of code I do not understand why have several frames, a link to a picture in particular would be a problem, but it's my first time using Flash and AS3 so I don't know any with its limits.

    Sorry for the overload of code and messy information! I thought it's better to provide too much information than too little and thanks for your help, it is much appreciated!

    rather than distributing your rooms in different key frames,

    Move them to separate the layers

    and use only the first image of each layer

    then do what amy suggested and is wirtie a document class that will have all your key code in

    or put all your code on the first frame of the first layer (separate layers where you have your rooms on)

    So, it becomes available for all your parts.

    To hide rooms you don't currently need put all the parts inside a table:

    var rooms: Array = [room1 room2... room100];

    then write a function

    function showRoom(_index:int):void {}

    for (var i: int = 0; i<>

    {if(i==_index)}

    rooms [i] .visible = true;

    }

    else {}

    rooms [i] .visible = false;

    }

    }

    }

    for example, when you move to the next room call sth. as

    showRoom (4);

    This will hide all parts in addition to the 5th

  • How to debug Error #1009?

    I var for all the mc in a great mc. This var allows me to apply MOUSE_OVER/OFF effect both the mc within the largest and mc.

    Everything works. Only one click that brings a user to another set of pages I have this error (I find it strange because this configuration has nothing to do with a click):

    IntroIMGS_COLLAGE.AppsIntro.addEventListener(MouseEvent.MOUSE_OVER, navOver_ORIGINAL_IntroIMGS_COLLAGE);
    IntroIMGS_COLLAGE.AppsIntro.addEventListener(MouseEvent.MOUSE_OUT, navOut_ORIGINAL_IntroIMGS_COLLAGE);
    
    
    function navOver_ORIGINAL_IntroIMGS_COLLAGE(e:MouseEvent):void
    {
        //loop through all icons
        for (var i in IntroIMGS_COLLAGE.AppsIntro)
            {
            //tween out all icons
            TweenMax.to(IntroIMGS_COLLAGE.AppsIntro[i], .2, {alpha:.85, blurFilter:{blurX:1, blurY:1}, colorMatrixFilter:{colorize:0x000000, amount:0.25, brightness:0.65, saturation:0.7}, ease:Sine.easeOut});
            }
            //target = tween the icon you are over to its normal state
            TweenMax.to(e.target, .5, {alpha: 1, blurFilter:{blurX:0, blurY:0}, colorMatrixFilter:{colorize:0x000000, amount:0, brightness:1.25, saturation:1}, ease:Sine.easeOut});
    }
    
    
    function navOut_ORIGINAL_IntroIMGS_COLLAGE(e:MouseEvent):void
    {
        for (var i in IntroIMGS_COLLAGE.AppsIntro)
            {
            //tween out all icons to a normal state
            TweenMax.to(IntroIMGS_COLLAGE.AppsIntro[i], .5, {alpha: 1, blurFilter:{blurX:0, blurY:0}, colorMatrixFilter:{colorize:0x000000, amount:0, brightness:1, saturation:1}, ease:Sine.easeOut});
            }
    }
    

    Here is the error message in the output panel:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    at acolyte68New_OpeningCollage_fla::mainsite_mc_2/navOut_ORIGINAL_IntroIMGS_COLLAGE() [e68New_OpeningCollage_fla.mainsite_mc_2::frame1:1428 acolyt]

    I tested in a way that I replaced "IntroIMGS_COLLAGE. AppsIntro"with"IntroIMGS_COLLAGE"- then it worked.

    All the mc table is inside the "AppsIntro" which is inside the "IntroIMGS_COLLAGE".

    It works in situations more:

    function navOut_ORIGINAL_IntroIMGS_COLLAGE(e:MouseEvent):void
    {

    if(IntrolIMGS_COLLAGE){
        for (var i in IntroIMGS_COLLAGE.AppsIntro)
            {
            //tween out all icons to a normal state
            TweenMax.to(IntroIMGS_COLLAGE.AppsIntro[i], .5, {alpha: 1, blurFilter:{blurX:0, blurY:0}, colorMatrixFilter:{colorize:0x000000, amount:0, brightness:1, saturation:1}, ease:Sine.easeOut});
            }


    }

    }

  • Question of casting translates to error #1009...

    Hello

    I'm having a problem of casting I'm hoping to solve. I have 2 tables:

    1 table = parent of the clip that I am trying to target

    2nd table = the clip I'm trying to target

    When I trace the results, I see the clip and the parent of the element, they exist on the stage and are qualified. When I try to get the element by its name in part 3, I get an error #1009.

    Can someone make a preview of what I am doing wrong, or suggest a better way to do what I'm doing?

    Much appreciation,

    ~ Chipleh

    for (var i:Number = 0;i<hitTargetArray.length;i++)
    {
       //1st array
       var hitClipParent:Object = Object(hitTargetParentArray[i]);
       trace("hitClipParent = "+ hitClipParent.name); //hitClipParent = colClip0
       trace(getQualifiedSuperclassName(hitClipParent)) //flash.display::MovieClip
    
       //2nd array
       var hitClip:Object = Object(hitTargetArray[i]);
       trace("hitClip = "+ hitClip.name); //hitClip = hitTarget0
       trace(getQualifiedSuperclassName(hitClip)) //flash.display::MovieClip
    
    
       //Part 3
       var hitTarget:Object = hitClipParent.getChildByName(hitClip);
       trace("hitTarget = "+ hitTarget.name);//TypeError: Error #1009: Cannot access a property or method of a null object reference.
       trace(getQualifiedSuperclassName(hitTarget))
    }
    
    

    in part 3 you must use hitClip.name if you don't see why you do not use Sakurakiss9131 directly:

      var hitTarget:Object = hitClipParent.getChildByName(hitClip.name);

    and now hitTarget is a reference FRO Sakurakiss9131

  • TypeError: Error #1009 generation stars on stage please help!

    Hey,.

    var arrayLAL:Array = new Array();

    arrayLAL.push (star);

    for (var a: uint = 0; has < 5; a ++) {}

    var Star: Star = new Star();

    star.x = 150

    star.y = stage.stageHeight * Math.Random ();

    addChild (star);

    trace (arrayLAL.length)

    stage.addEventListener (MouseEvent.MOUSE_MOVE, lalBlocksMove);

    }

    function lalBlocksMove(evt:MouseEvent)

    {

    addEventListener (Event.ENTER_FRAME, lalBlocksCollision);

    }

    function lalBlocksCollision(event:Event)

    {

    for (var a: uint = 0; has < arrayLAL.length; a ++)

    {

    if (arrayLAL [a] .hitTestPoint (mouseX, mouseY, true))

    {

    this.removeChild (star);

    }

    }

    }

    This is the code that im using and this is the error I get:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to Star_fla::MainTimeline/lalBlocksCollision()

    Im trying to auto generate a number of stars on the stage and then put each in a table and then delete a text hit... previously I created sumthing very similar except that I had to manually push each of the objects in the table, while hoping that it may work as well, coz I have a lot of objects in the last verious: S

    also im not rly sure if this is possible, but I want to 'auto' align you stars so they are not above the knees but rather arragne around the screen evenly as in the lines and coloms... is this possible? or am I to hopeful?

    thx for advice, assistance or suggestions... all is much appreciated

    Pavel

    Pass the grid (rectangle) to the function.  I gave an example of the use of the entire scene for the grid.

  • TypeError: Error #1009: cannot access a property or method of a null object reference.      to tail/Chec

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to Tail / CheckCollision ([Tail::frame1:5])

    I have 2 movieclips, head and tail placed on stage (frame 1 and exported for ACE), head is the name of the instance of head, the tail has instances tail_1, tail_2, tail_3, tail_4 , I'm trying to detect collisions between these two. When head hits any instance of the queue class I want to delete tail_3 and tail_4 how this can be done?

    Code on frame 1 of tail MC

    function CheckCollision(evt:Event):void

    {

    If (Math.abs (MovieClip (root).head.x - x) < 20 & & Math.abs (MovieClip (root).head.y - y) < 20) / / 20 is the size of each and registration is at the centre

         {

    MovieClip (root) .collisionDetected = 1;

         }

    }

    addEventListener (Event.ENTER_FRAME, CheckCollision);

    Code on the MainTimeLine

    for (var m:uint = 3; m < = 4; m ++)

         {

    removeChild (getChildByName ("tail_" + m));

    tail_3 and tail_4 are dynamically added class tail by another function (which is not relevant here), tail_1 and tail_2 are on //stage

         }

    I get this message but SWF file works fine, there is no error either, and BTW if I don't know this message there will be a problem with performance, this message very much continue to pour into the output window (I guess that's normal since I ENTER_FRAME event)

    If you add these bodies without a name in one table, then you can loop through the array and use something like...

    for (var i: uint = 0; i

    {if (mcA.hitTestObject (mcBArray [i]))}

    No matter what

    }

    }

    You can probably also do the same at the breast of each mcB, just using the reverse, without looping...

    {if (this.hitTestObject (MovieClip (root) .mcA))}

    No matter what

    }

    You just need to be sure that you are targeting mcA (or BCP) correctly, which you can determine by drawing the target.

  • Error #1009: cannot access a property or a method of a null object reference

    I tried to add an event listener for the stage, but it still does not work. I have moved things and does not work either. It is 02:30 in the morning here and didn't sleep until I get this tri - could someone take pity please?

    Error #1009: cannot access a property or a method of a null object reference

    at GameSunnyFly()

    Also it keep telling me that I had a low problem - it is highlighted in black as well.

    package

    {

    import flash.display.MovieClip;

    import flash.display.MovieClip;

    import flash.media.Sound;

    import flash.events.Event;

    import flash.ui.Mouse;

    import flash.events.MouseEvent;

    import fl.transitions.Tween;

    import fl.transitions.TweenEvent;

    fl.transitions.easing import. *;

    import flash.geom.Point;

    import flash.utils.Timer;

    import flash.events.TimerEvent;

    import flash.utils.getDefinitionByName; Join mcs library

    import proyectos.trivia.TriviaEvent;

    import flash.media.SoundMixer;

    /**

    * ...

    * @author...

    */

    /public class GameSunnyFly extends MovieClip {}

    private var v: Number = 8;

    varObject:String private var;

    i: Number private var;

    arrayObjects:Array private var;

    soundsArray:Array private var;

    soundClip:Sound private var;

    randomnumber:Number private var;

    contadorHits:uint private var;

    private var notTweening:Boolean = true;

    tweenedObject:MovieClip private var;

    tiempoTotal:uint private var;

    tiempoTimer:Timer private var;

    clickPoint:Point private var;

    public void GameSunnyFly() {}

    this.i = 1; -You forgot to initialize I to your table

    this.setObjects ();

    this.setSounds ();

    this.clickPoint = new focus();

    this.varObject = arrayObjects [i-1];

    this.addEventListener (Event.ADDED_TO_STAGE, this.onAddedToStage);

    }

    private function setObjects (): void {}

    var numOfObjects:Number = 5;

    var arrayObjects:Array = new Array();

    for (var i: int = 1; i < = numOfObjects; i ++)

    {

    var ClassRef: Class = getDefinitionByName ("ObjectClass" + i) as class;

    var objInst:Object = new ClassRef();

    objInst.x = i * 100;

    objInst.y = i * 100;

    objInst.scale =. 20;

    objInst.scale =. 20;

    this.arrayObjects = ["one", "two", "three", "four", "five"];

    arrayObjects.push (objInst);

    this.addChild(arrayObjects[arrayObjects.length-1]);

    }

    }

    function onAddedToStage(e:Event) {}

    this.stage.addEventListener (MouseEvent.MOUSE_MOVE, this.myClickReaction);

    this.stage.addEventListener (Event.ENTER_FRAME, this.onEnterFrameThis);

    }

    public void getXMLName(nombre:String) {/ / necessary for a swf continaer read this because it is a document class}

    trace ("game2SunnyFlying", number);

    }

    private void setSounds () {}

    var numOfSounds:Number = 5;

    var soundsArray:Array = new Array();

    for (var i: int = 1; i < = numOfSounds; i ++)

    {

    var ClassRef: Class = getDefinitionByName ("SoundClass" + i) as class;

    var objInst:Object = new ClassRef();

    soundsArray.push (objInst);

    / / this.addChild(soundsArray[soundsArray.length-1]);   addChild is to DISPLAY so no sounds

    }

    }

    function myClickReaction(e:MouseEvent):void {}

    this.clickPoint.x = this.mouseX;

    this.clickPoint.y = this.mouseY;

    }

    private void onEnterFrameThis(event:Event):void {}

    varObject = this.arrayObjects [i-1];

    this .x-= [varObject] 5.

    If (this [varObject] .x <-10) { }

    this .x = this.stage.stageWidth [varObject] + 20;

    }

    += this.hero.x (clickPoint.x-this.hero.x)/v;

    += this.hero.y (clickPoint.y-this.hero.y)/v;

    {if(this.varObject!=null)}

    if (this.hero.hitTestObject (this [varObject])) {}

    ++ this.contadorHits;

    this.spin ();

    trace (varObject);

    }

    }

    }

    Click file/publish settings/flash and check "permit debugging".  Repeat the test.

    the line of problematic code will be mentioned in the error message.  copy and paste the full error message and highlight the line of problematic code.

  • TypeError: Error #1009: cannot access a property or method of a null object reference?

    Mr President.
    I updated firefox and always this type of problem
    every time I tried to open the flash game site iam getting this question. sometimes IE browser cannot open it too much.
    "".... TypeError: Error #1009: cannot access a property or method of a null object reference.
    to ASGames / fun_Menu)
    to ASGames / frame2)
    at flash.display::MovieClip/gotoAndStop()
    to WeddingTianaDressup_fla::Timeline_102 / playGames ()... » »

    but the same site can be opened in other browsers in the same pc... but the same site a user goes to another computer on the browser firefox itself. How do not know where is the problem... ?
    so please, some can help hu?

    Dear Sir.
    Thanks for your answer...! I did what you said but it doesn't work. new iam having the same problem...!

  • Can't access iscsi with ' error in the evaluation table display iscsilist IndexSizeError:

    I have been using my readyNAS years and today, after having extended a target (in volume), I can't access the Volumes-> iSCSI tab anymore.

    SOS!

    I really need.

    The error I get in FF:

    "Error in the evaluation table display iscsilist IndexSizeError: Index or size is negative or greater than the quantity allowed.

    It's a bit different in Chrome, but it won't let me copy it.

    Error in the evaluation table display iscsilist IndexSizeError: cannot set property 'maxLength' on "HTMLInputElement": the provided value is (-1) is negative.

    Any suggestions please?

    Thank you!

    It was super useful:

    https://community.NETGEAR.com/T5/using-your-ReadyNAS/ReadyNAS-2100-error-encountered-uploading-updat...

    I downloaded the update of intermediate as a file and updated firmware to update.

    And now I can access the iscsi again tab.

    MDGM, thanks a lot!

    I'm a happier person now!

  • Hi, what is error 1009

    Hi I can not update my app for my iPhone error 1009

    What country are you physically located in? AppStore from which countries are

    you are trying to download from? ITunes of which country is your account?

    What VPN do you use?

  • Flash Player ' TypeError: Error #1009: cannot access a property or method of a null object reference. to town_fla::Button_237 / frame1 () '.

    Hey, I opened a page that runs Flash this always whenever rises ' TypeError: Error #1009: cannot access a property or method of a null object reference.     to town_fla::Button_237 / frame1 () '. The dialog box gives me two options either urgent continue or reject all. Normally I just press "Ignore all" and continue, but I was wondering if there was a solution to this problem. Either way, my computer runs Windows Vista Edition home premium.
    Thanks for the help.

    Hello

    To provide the proper resolution, that I would need more information on your side.

    1. is the computer connected to the domain?

    2. what web browser do you use?

    3. when exactly the problem started?

    I suggest you uninstall and reinstall the latest version of Adobe flash player. Check if it helps.

    Step 1:
    Uninstall Adobe flash player follow the steps in the link following link:

    http://kb2.Adobe.com/CPS/141/tn_14157.html

    Step 2:
    Download and install the latest version of adobe flash player from the following link:

    http://get.Adobe.com/flashplayer/

    Hope this information helps. If you need additional help or information on Windows, I'll be happy to help you.

  • Windows Modules Installer error: 1009

    Hello

    I use Windows 7. I made this mistake in a significant way of Error 1935. I encountered this problem with many cases, including install MSXML 4.0 SP2 etc.
    And I used the method of size of the registry unlimited (value 0xffffff) etc. All do not work in my PC.

    After I checked the CBS, I realized that it's something wrong in the modules of windows install (trustedinstaller.exe), when I tried to start the services, I got the following error:

    Windows could not start the service of installation of modules windows on the Local computer.

    Error 1009: The configuration registry database is damaged.

    We still need to fix without reinstalling windows (see: http://social.technet.microsoft.com/Forums/en/itprovistaapps/thread/17b35f3e-82c3-4491-b94e-6a01c3abf854)? I have a lot of already installed SW.

    Here is an excerpt of the CBS.log newspaper

    2011-12-06 17:10:33, info CBS TrustedInstaller start initialization.
    2011-12-06 17:10:33, v6.1.7601.17592 Info CBS responsible Servicing Stack with Core: C:\WINDOWS\winsxs\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17592_none_0b0e4b4025cf4049\cbscore.dll
    2011-12-06 17:10:33, CBS News could not load the hive of COMPONENTS of "C:\WINDOWS\System32\config\COMPONENTS" in the registry key 'HKLM\COMPONENTS '. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, CBS News could not load the DLL WCP. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, info CBS failed to initialize the base DLL: [HRESULT 0x800703f1 - ERROR_BADDB =] C:\WINDOWS\winsxs\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17592_none_0b0e4b4025cf4049\cbscore.dll
    2011-12-06 17:10:33, CBS News could not initialize the basis of CBS. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, initialization information CBS ending TrustedInstaller.
    2011-12-06 17:10:33, CBS News could not initialize the Trusted Installer. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, finalization of information CBS from TrustedInstaller.
    2011-12-06 17:10:33, trusted Installer Info CBS core has not been initialized.
    2011-12-06 17:10:33, finalization of information CBS ending TrustedInstaller.

    Thanks in advance.

    Hi Larry,

    Follow these steps:

    Method 1:

    Scan a checker (SFC) system files on your computer.

    SFC tool scans system files and replaces incorrect versions of system files by using the correct versions.

    For instructions, see How to use the tool File Checker system to resolve missing or corrupted on Windows Vista or Windows 7 system files

    Method 2: Perform a repair of Windows 7 installation.

    For instructions, see this article:

    How to perform an upgrade on the spot on Windows Vista, Windows 7, Windows Server 2008 & Windows Server 2008 R2

    See also: installation and reinstallation of Windows 7

  • ActionScript3 Error #1009: Cannot access a property or method of a null object reference

    Having a problem with the creation of a website in CC animate with ActionScript3.

    Any help would be appreciated.

    Basically, I'm trying to get 'home', 'services' 'contact' buttons work when you click "about".

    import flash.events.MouseEvent;

    Stop();

    header_mc.home_btn.addEventListener (MouseEvent.CLICK, gohome);

    gohome function (event: MouseEvent): void {}

    gotoAndStop (1);

    }

    header_mc.about_btn.addEventListener (MouseEvent.CLICK, goabout);

    function goabout (event: MouseEvent): void {}

    gotoAndStop (2);

    }

    header_mc.services_btn.addEventListener (MouseEvent.CLICK, goservices);

    goservices function (event: MouseEvent): void {}

    gotoAndStop (3);

    }

    header_mc.contact_btn.addEventListener (MouseEvent.CLICK, gocontact);

    function gocontact (event: MouseEvent): void {}

    gotoAndStop (4);

    }

    Ran the test after allowing debugging and myself

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    at WORKINGwebsite_fla::MainTimeline/frame1() [WORKINGwebsite_fla. MainTimeline::frame1:3]

    Chassis 1 line 3.

    1009 error indicates that one of the objects targeted by your code are out of reach.  This may mean that the object...

    -is declared but not instantiated

    n ' is not have an instance name (or the name of the instance is misspelled)

    n ' is not in the frame where this code tries to talk to her

    -is animated in place, but is not assigned the name of the instances of each keyframe for her

    -is one of the two or more consecutive keyframes of the same objects without a name assigned in the image previous (s).

  • ERROR / T_ITEMS in the TABLE is changing, function of triggering/can not see ORA-06512... ?

    Hi all

    I CREATED THE TRIGGER TO CHECK NOM_ELEMENT BEFORE UPDATE ON THE T_ITEMS TABLE IF AN ANOTHER NOM_ELEMENT LIKE NOM_ELEMENT CURRENT OR NOT, IF AS AN ANOTHER NOM_ELEMENT DON'T SAVE UPDATED CURRENT NOM_ELEMENT.

    MY NO IS:

    1 - I CREATED the FUNCTION CALL CH_UNIQUE_ITEM_NAME

    CREATE OR REPLACE FUNCTION CH_UNIQUE_ITEM_NAME
    (NUMBER OF P_ID, P_ITEM_NAME IN VARCHAR2)
    RETURN NUMBER
    AS
    NUMBER OF X_COUNT;
    -FUNCTION "CH_UNIQUE_ITEM_NAME" TO CHECK NOM_ELEMENT LIKE OTHER NOM_ELEMENT OR NOT.
    BEGIN
    SELECT COUNT (ITEM_NAME)
    IN X_COUNT
    OF T_ITEMS
    WHERE ID! P_ID =
    AND UPPER (ITEM_NAME) AS UPPER (P_ITEM_NAME);
    RETURN X_COUNT;
    END CH_UNIQUE_ITEM_NAME;

    2. I CREATED TRIGGER CALL TRG_CH_UNIQUE_T_ITEMS

    CREATE OR REPLACE 'TRG_CH_UNIQUE_T_ITEMS' before FIRING
    UPDATE
    ON T_ITEMS FOR EACH LINE
    DECLARE
    NUMBER OF X_CHECK;
    BEGIN
    SELECT CH_UNIQUE_ITEM_NAME (: OLD.ID,: NEW.) NOM_ELEMENT) IN DOUBLE X_CHECK;
    IF (: NEW.) NOM_ELEMENT DISLIKES: OLD. Nom_element AND X_CHECK > 0)
    THEN RAISE_APPLICATION_ERROR (-20007, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    END IF;
    END;

    NOW WHEN I UPDATE ANY ITEMS FOUND ERROR "ERROR / T_ITEMS in the TABLE is changing, function of triggering/can not see ORA-06512.

    Form on T_ITEMS22222.png

    Please help me TO RESOLVE THIS ERROR. I TIRED TO SOLVE...

    Thank you

    You don't realize that you have just set a UNIQUE INDEX of several columns?

    create unique index index_name_uq on table_name( user#, upper(item_name) );
    

    In addition, a GUI Design point, (using the terms of the APEX) that you want to validate the data before submit you.

    (use a Page-level Validation)

    MK

Maybe you are looking for