2 Replies Latest reply on Dec 28, 2010 9:41 PM by kiran7881

    How can I set a timeout for a SQL Connection?

    Kevin C. Burke Level 1

      I have a SQLite file to which I'm connecting. I don't have a safety function to quit the SQL connection if it's taking too long. Can anyone offer a means to do this?


      I've tried the following:


      _sqlStat is my SQLStatement.


      public function timeLongConnectionHandler (e:Event):void
                  var connectionTimer:Timer = new Timer(1000, 0);
                  connectionTimer.addEventListener(TimerEvent.TIMER, skipLongConnectionHandler);
      public function skipLongConnectionHandler (e:TimerEvent):void
                  trace("Connection Delay - DB Data Skipped");


      Which throws this error:
      Error: Error #3106: Property cannot be changed while SQLStatement.executing is true.