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 8465605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:05:55+00:00 2026-06-10T15:05:55+00:00

I am trying to troubleshoot why my code returned null for all my queries

  • 0

I am trying to troubleshoot why my code returned null for all my queries and finally found that sql query returns nothing. I created a new AIR document (s:WindowedApplication) with minimalistic code:

<fx:Script>
        <![CDATA[
            import mx.events.FlexEvent;

            private var sqlConnection:SQLConnection;
            private var select:SQLStatement;
            private var databaseFile:File;

            protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
            {
                var dbPath:String = "Movie Manager Settings/moovioDB2.db";
                databaseFile = File.userDirectory.resolvePath(dbPath);
                sqlConnection = new SQLConnection();
                select = new SQLStatement();

                sqlConnection.addEventListener(SQLEvent.OPEN, onDatabaseOpen);
                sqlConnection.openAsync();
            }

            private function onDatabaseOpen(event:SQLEvent):void
            {
                select.sqlConnection = sqlConnection;
                var query:String = "SELECT title FROM movies";
                select.text = query;
                select.addEventListener(SQLEvent.RESULT, done);
                select.execute();
            }

            private function done(event:SQLEvent):void{
                var res:SQLResult = select.getResult();
            }

        ]]>
    </fx:Script>

Other than this code theres is just the standard tags created by Flex. Upon execution I get this error:

Error #2044: Unhandled SQLErrorEvent:. errorID=3115, operation=execute , message=Error #3115: SQL Error. , details=no such table: 'movies'

I have checked the database file with 2 different sqlite programs and executed the query successfully. Both ‘movies’ table and ‘title’ column exists. In case it matters movies is one of 3 tables and has over 10 columns all with values present.

What am I doing wrong? I used identical code(I thought) before with expected results, but after some changes now I can even get this basic code in a new document to work. Please check it out and see if I am making a stupid mistake because I can’t see it 🙂

  • 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-06-10T15:05:57+00:00Added an answer on June 10, 2026 at 3:05 pm

    Can you verify that the path of the database you open is the one of that file you checked with external tools? You can use the database_list pragma from within you AS3 code. Just execute it as any other SQL statement:

    [user@host ~]$ cd /tmp
    [user@host tmp]$ sqlite3 foo.db
    SQLite version 3.7.11 2012-03-20 11:35:50
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    sqlite> pragma database_list;
    0|main|/tmp/foo.db
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While trying to troubleshoot a problem I'm having with a project, I noticed that
I am trying to troubleshoot a VB.NET project that contains UserControls (actually, several of
I've been browsing through all of the CSS related cross-browser questions trying to troubleshoot
I have a software-hardware related issue that I'm trying to troubleshoot. My app was
What does it mean when all BlockingSPIDs are 0? I'm trying to troubleshoot deadlocks
I'm getting terribly slow results from the following code. I've been trying to troubleshoot
I've been trying to troubleshoot this, but can't find a good function that will
I am having this odd error with my code. I am trying to troubleshoot
I am trying to troubleshoot an issue that is popping up on our new
I'm working on a codeigniter project and I'm trying to troubleshoot a sql issue.

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.