lecosson / assql

Automatically exported from code.google.com/p/assql
0 stars 0 forks source link

Not working with MySQL in AIR #77

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use example 1 with MySQL
2. Use example 2 / 3 with MySQL

What is the expected output? What do you see instead?

When using example 1, I would expect a response or a result to be dispatched on 
a statement execution, instead nothing is dispatched, but the 
service.lastResult does should that the query 
executed successfully. When using example 2 or 3 a result is returned, but the 
result set only contains the metadata of how many columns would be returned or 
number of row affected. I 
would expect results to be returned on  a listener or data returned on a Async 
result. 

Please use labels and text to provide additional information.

I am wondering if there is a setting in the connection that would affect this, 
and am looking for 
any help to resolve this. I really would like to use and think it is great. 
Thanks for the help

Original issue reported on code.google.com by imhoffjustin on 29 Apr 2009 at 4:12

GoogleCodeExporter commented 9 years ago
Attached are pictures of what is in the database and what is being returned - i 
am not sure where the disconnect 
is.

Original comment by imhoffjustin on 29 Apr 2009 at 5:39

Attachments:

GoogleCodeExporter commented 9 years ago
Maybe you can try to use the following code instead of addEventListener():

  var token:MySqlToken = statement.executeQuery();
  token.addResponder(new AsyncResponder(result, fault, token));

  private function result(data:Object, token:Object):void
  { 
    //do something when executing query success
  }

  private function fault(info:Object, token:Object):void
  {
    //do something when executing query failed
  }

This is what I do and I got the data which I want.

Original comment by james.ch...@gmail.com on 10 May 2009 at 1:45

GoogleCodeExporter commented 9 years ago
my problem is in the function result : 
i have for example variable=100; when i want to get this value out of my 
function the
value of my variable is initialized to 0. i can't find a solution for that.
some code :

public function noteCritere(le_handicape:int,k:String):int {
this.note=0;
// i declared token , responder and note as a variables in my class
token=service.send("select "+typeAff+" from critere");

            responder = new AsyncResponder( 
                        function(data:Object, token:Object):void {

                                        rs = ResultSet(data);   
                                        // am just giving an example, this 1500 is a
result from my query
                                        note = 1500;
                                        }
},                
                function(info:Object, token:Object):void {
                        Alert.show("Error: " + info);
                },
                token
            );

            token.addResponder(responder);
            return note;
        } 

normally note is modified by the fuction, i tried other variables and all are
initialized. Any help?
tthanks and sorry for my english :$

Original comment by mariem.a...@gmail.com on 2 Jun 2009 at 5:14