If you are not getting any SQL exceptions, check you OrgId, and actual
IDs in table. Then check what do you have in result variable.

--- In flexcoders@yahoogroups.com, "Nick Collins" <[EMAIL PROTECTED]> wrote:
>
> Okay, I'm trying to execute a query on my local SQLite database using
> the following code, but am not having any luck. When I run the same
> SQL code in Cristophe's SQL Admin app, it works fine, returning the
> two records. However, when I run it here with my code, it returns a
> null as the result value. What am I doing wrong?
>
>
> /** CODE BEGIN**/
>
> public function getContributorsList(orgID:int):void
>   {
>             stmt.sqlConnection = sqlConnection;
>    stmt.text = "SELECT * FROM CONTRIBUTORS WHERE ORGID = :orgID ORDER
> BY LAST_NAME, FIRST_NAME";
>    stmt.parameters[":orgID"] = orgID;
>    stmt.addEventListener(SQLEvent.RESULT, resultHandler);
>    stmt.addEventListener(SQLErrorEvent.ERROR, errorHandler);
>    stmt.execute();
>   }
>
> private function resultHandler(event:SQLEvent):void
>   {
>       var result:SQLResult = stmt.getResult();
>       var numResults:int = result.data.length;
>       for (var i:int = 0; i < numResults; i++)
>       {
>           var row:Object = result.data[i];
>           var output:String = "ContribNum: " + row.CONTRIBNUM;
>           output += "; First Name: " + row.FIRST_NAME;
>           output += "; Last Name: " + row.LAST_NAME;
>           trace(output);
>       }
>   }
>

Reply via email to