2 Replies Latest reply on Nov 12, 2008 1:27 PM by Flexterbator

    Database Help

    masita18 Level 1
      Hi! I have a question regarding database and sequence flow.

      This is my code:
      private function resultGetRelationships(event:ResultEvent):void{
      testArea1._linkCollection.removeAll();
      for each(var rShipId:int in ModelDbService2.getRelationships.lastResult){
      var MDrShipID:ModelDb=new ModelDb();
      MDrShipID.rShipID = rShipId;
      ModelDbService.getRShipTest(MDrShipID); <---- getting result from database
      trace("for each first");
      }

      testArea1.addChildrenLink(); <---- is a function.
      }


      When i run, this is what i get on the console:
      for each first
      aaa2 <------- this is trace in method testArea1.addChildrenLink();
      aaa2 <------- this is trace in method testArea1.addChildrenLink();
      linkCollection1 <------ this is trace in method ModelDbService.getRShipTest(MDrShipID);

      The problem is now before it finish to do the database, it will already started doing the function. Is there any setting so that the sequence flow won't be effected.
        • 1. Re: Database Help
          Level 7

          "masita18" <webforumsuser@macromedia.com> wrote in message
          news:gfe8s5$o37$1@forums.macromedia.com...
          > Hi! I have a question regarding database and sequence flow.
          >
          > This is my code:
          > private function resultGetRelationships(event:ResultEvent):void{
          > testArea1._linkCollection.removeAll();
          > for each(var rShipId:int in
          > ModelDbService2.getRelationships.lastResult){
          > var MDrShipID:ModelDb=new ModelDb();
          > MDrShipID.rShipID = rShipId;
          > ModelDbService.getRShipTest(MDrShipID); <---- getting result from
          > database
          > trace("for each first");
          > }
          >
          > testArea1.addChildrenLink(); <---- is a function.
          > }
          >
          >
          > When i run, this is what i get on the console:
          > for each first
          > aaa2 <------- this is trace in method testArea1.addChildrenLink();
          > aaa2 <------- this is trace in method testArea1.addChildrenLink();
          > linkCollection1 <------ this is trace in method
          > ModelDbService.getRShipTest(MDrShipID);
          >
          > The problem is now before it finish to do the database, it will already
          > started doing the function. Is there any setting so that the sequence flow
          > won't be effected.

          It looks like this is an event handler for another service call, so I'm not
          sure why you're not understanding that when you make another service call in
          here that you need to add an event listener again and wait again for the
          result.


          • 2. Re: Database Help
            Flexterbator Level 1
            Hi guys, ive just been doing tutorials where ive exported my flex app as a AIR app and it is using the built in SQLite to create a database on the users machine.

            what i was wondering is; how secure is this? what options are available to prevent someone decrypting it or searching the install location and accessing the SQL file? also if you could recomend any precautions i should take to limit these risks?

            im a student so this is part of my research and would be really helpful.

            P.S. i bought this book called adobe FLEX 3.0 Training from the source, i highly recommend it for getting started quick as i have chosen this for my honours project and im really enjoying it i just need a bit of technical mumbo jumbo such as pro's and cons in comparison to using eclipse, net beams, asp etc for my documentation