Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7000241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:38:45+00:00 2026-05-27T20:38:45+00:00

I create an array: var Detail:Array = new Array(getClass.detailArticle(brand, subgroup, name)); The method: public

  • 0

I create an array:

var Detail:Array = new Array(getClass.detailArticle(brand, subgroup, name));

The method:

    public function detailArticle(brand:String, subgroup:String, name:String):Array
    {
        var sqlConnection:SQLConnection;
        sqlConnection = new SQLConnection();
        sqlConnection.open(File.applicationStorageDirectory.resolvePath("assets/db.sqlite"));
        var stmt:SQLStatement = new SQLStatement();
        stmt.sqlConnection = sqlConnection;
        stmt.text = 
            "SELECT * FROM sen_updatesnew " +
            "WHERE Brand= '" + brand + "' " +
            "AND SubGroup= '" + subgroup + "' " +
            "AND Name = '" + name + "' ";
        stmt.execute();
        var result:Array = stmt.getResult().data;
        return result;          
    }

How to access the elements?

Detail[“element”] or Detail[0] are not showing anything. The query is working by the way.

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:38:45+00:00Added an answer on May 27, 2026 at 8:38 pm

    From the docs

    If the responder argument is not null the specified Responder object designates methods that are called to handle the results of the operation. If the responder argument is null, in asynchronous execution mode a result event is dispatched if the operation is successful, or an error event is dispatched if the operation fails.

    Since you have a null responder argument for the execute method, you will have to listen for the results in the result event. It sounds like you’re trying to access the results before they are retrieved.


    // make your result array an instance variable, not a functional local variable
    protected var result:Array ;
    
    // make this an instance variable so it can be accessed across methods
    protected var stmt:SQLStatement = new SQLStatement();
    
    // this can't return anything because there is nothing to return at the time this method completes it's execution
    public function detailArticle(brand:String, subgroup:String, name:String):void
    {
        // some stuff
        // add the event listener for the result event
        stmt.addEventListener('result',onResult);
        // other stuff
        // no return statement
    }
    
    
    // the result handler
    protected function onResult(event:SQLEvent):void{
        result = stmt.getResult().data;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create an associative array: var aa = {} // Equivalent to
I have an array created with this code: var widthRange = new Array(); widthRange[46]
I create array: TextBox[] textarray = new TextBox[100]; Then in cycle set this params,
I need to create an array by searching a string for occurrences of '['
In Delphi, it is possible to create an array of the type var Arr:
What would be the tersest way to create this array: var x = [1,
I'm trying to create an array, looping through another array and taking the string
I created the following 2D array in Javascript // Create basic linear array var
var longitudeArray = new Array(<?php $result = count($longitudeArray); if ($result > 1){ echo implode(',',
<?php var_dump(stream_context_create(array()));?> http://php.net/manual/en/function.stream-context-create.php sez Return Values: A stream context resource. the return value should

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.