0 Replies Latest reply on Feb 26, 2010 3:59 AM by hodkov

    StackOverFlow exception in SQLResult (transaction with mass insert)

    hodkov

      Open SQLlite database in async mode.

       

      code:

      //////////////////////////////////

       

      // it's SQLConnection

      _connection.begin(SQLTransactionLockType.DEFERRED,
                          new Responder(onTransactionBeginned, onTransactionBeginningError));

       

      var statement:SQLStatement;

       

      for (var i:int = 0; i < 10000; i++) {
           statement = new SQLStatement();
           statement.sqlConnection = _connection;

           statement.text = /*some INSERT query here*/;

       

           /* init  statement.parameters here*/

       

           statement.execute(-1, new Responder(onSuccess, onError));

      }
      _connection.commit(new Responder(onCommited, onCommitError));

       

      ////////////////////////////////////

       

      In one computer (Desctop PC) it works correct (even with 100 000 INSERT queries).

       

      In other computer (Notebook Fujitsu-Siemens) i have exception:

       

      Error: Error #1023: Stack overflow occurred.

      at flash.data::SQLResult()

       

      If i make 5 000 INSERT queries - it works correct.

       

      Why?

       

      (WinXP SP3 in both computers)

       

      How match queries in one transaction can i using?