Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Then using assql in pure AS3 mode error in MySqlToken.getRows() #102

Open
GoogleCodeExporter opened this issue Aug 7, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.
Create as3 project using FlashDevelop and Flex SDK
2.
Create test database
3.


        private function handleConnected(e:Event):void {
            var st:Statement = con.createStatement();


            var token:MySqlToken = st.executeQuery("SELECT * FROM users LIMIT 10");
            token.addEventListener(MySqlEvent.RESULT, onResult);
            token.addEventListener(MySqlErrorEvent.SQL_ERROR, onError);
        }

        private function onResult(e:MySqlEvent):void {
            var resultSet:ResultSet = e.resultSet as ResultSet;
//ERORR!!
/*
Error text:
ReferenceError: Error #1065: Variable ArrayCollection is not defined.
    at global/flash.utils::getDefinitionByName()
    at com.maclema.mysql::ResultSet/getRows()[/Users/Matt/Documents/Adobe Flash Builder Beta 2/asSQL_PureAS3/src/com/maclema/mysql/ResultSet.as:344]
*/          
var ar:Array = resultSet.getRows();
            for (var i:int = 0; i < ar.length; i++) {
                trace(ar[i]);
            }
            trace("onResult", e.resultSet);
        }



If you look at adobe reference about getDefinitionByName function
You will find, that it throws error     ReferenceError  ( — No public definition 
exists with the specified name. )

Obviously, you should add try-catch block to this part of code.

PS And thank you for such good and useful library.

Original issue reported on code.google.com by [email protected] on 9 Jun 2010 at 9:05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant