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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:51:32+00:00 2026-05-24T13:51:32+00:00

I am getting Syntax Error 1202 (Access of undefined property connection in package model)

  • 0

I am getting Syntax Error 1202 (Access of undefined property connection in package model) in the following code while trying to access the model.connection property. I don’t see any reason why this would appear, can anyone see something I may be overlooking?

Model.as

package valueObjects
{
import flash.data.SQLConnection;

import mx.collections.ArrayCollection;

public class Model
{
    public var connection:SQLConnection;
    public var albums:ArrayCollection = new ArrayCollection();
    public var albumItems:ArrayCollection = new ArrayCollection();
    public var selectedAlbum:Number = 0;
    public var selectedItem:Number = 0;

    public function Model()
    {
    }
}

}

And the actual code in my default mxml file, init() is called on initialize

        import model.ModelLocator;

        import mx.core.mx_internal;

        import valueObjects.Model;

        protected var sqlConnection:SQLConnection;
        private var model:Model = new Model();

        protected function init():void
        {
            createDb();
            navigator.firstViewData = model;
        }

        protected function createDb():void
        {
            sqlConnection = new SQLConnection();
            sqlConnection.open(File.applicationStorageDirectory.resolvePath("Oxford.db"));
            var stmt:SQLStatement = new SQLStatement();
            stmt.sqlConnection = sqlConnection;
            stmt.text = 
                "CREATE TABLE IF NOT EXISTS albumItems (" +
                "id INTEGER PRIMARY KEY AUTOINCREMENT, " +
                "album INTEGER, " + 
                "name STRING, " + 
                "dateAdded DATE)";
            stmt.execute();

            model.connection = sqlConnection;
        }
  • 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-24T13:51:32+00:00Added an answer on May 24, 2026 at 1:51 pm

    The issue here is that you have a package and a variable named ‘model’. When you try to access the variable named model, it thinks you are referring to the package. If you correct this naming collision, you will see that this issue is fixed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the following error on the line of code below: Syntax error (missing
Trying to execute someone's code, getting a syntax error. No idea why :( def
I have following vb.net code and i am getting syntax error in it Update
im getting a syntax error on this line of code and don't know the
I'm getting a syntax error while using the code below. it suppoused to avoid
I am getting syntax error with the following statement REPLACE INTO users (screenname, token,
I'm getting syntax error in firebug here is the code : $('#moderator-attention').live('toogle', function(){ function
i am using this code <a onclick=javascript:var t=setInterval(GetUpdates(5,ajaxResult),300);>GetUpdates</a> but getting the syntax error
I am getting Incorrect syntax near the keyword 'select' after executing the following code.
I am getting syntax error in following statement...but I want to use it by

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.