Hi Coders
I want to return a value from a handler function that is nested inside a
function. The scenario is to check the duplicate

Does anybody know how to achieve it?

public function checkDuplicate(email:String):Boolean {

var checkStmt:SQLStatement = new SQLStatement();

checkStmt.sqlConnection = conn;

var sql:String = "select * from people where email = '[EMAIL PROTECTED]' ";

checkStmt.text = sql;

checkStmt.addEventListener(SQLEvent.RESULT, function(e:SQLEvent):Boolean {

var result:SQLResult = checkStmt.getResult();

Alert.show(result.data[0]["name"])

return true;

});

//checkStmt.addEventListener(SQLErrorEvent.ERROR, errorDBHandler);

checkStmt.execute();

}

-- 
Berkay UNAL
[EMAIL PROTECTED]

Reply via email to