title: flex 4.6 counting rows in sqlite table
body: <p>This one is driving me mad for the last 3 hours. I want to check there are no records in an existing sqlite table:</p>
  
  <pre><code>...    
  stmt.text = "SELECT id FROM customers";
  stmt.execute();
  var result:Array = stmt.getResult().data;
  
  if(result.length == 0)
  {
      return 1;
  }
  </code></pre>
  
  <p>The customer table exists but is empty. While running it flex gives this error on result.length:</p>
  
  <pre><code>Error #1009: Cannot access a property or method of a null object reference.
  </code></pre>