AIR SQLite IN expression not working

Posted by goseta on Stack Overflow See other posts from Stack Overflow or by goseta
Published on 2010-03-14T21:40:58Z Indexed on 2010/03/14 21:45 UTC
Read the original article Hit count: 186

Filed under:
|
|
|

Hi, I'm having a problem with an expression in my sql statement in SQLite for Adobe AIR

basically I have this

sql = "UPDATE uniforms SET status=@status WHERE customerId IN(19,20)";
updateStmt.parameters["@status"] = args[1];
updateStmt.execute();

if I run the above code it works, updating the status when the id are 19 and 20

but if I pass the ids list as a parameter like this

sql = "UPDATE uniforms SET status=@status WHERE customerId IN(@ids)";
updateStmt.parameters["@status"] = args[1];
updateStmt.parameters["@ids"] = "19,20";
updateStmt.execute();

it gives me and error, saying could not convert text value to numeric value, which make sense because I'm passing and string but the IN expression should convert it accordingly, like it does when I pass directly the list values, why is not working the other way, thanks for any help!

© Stack Overflow or respective owner

Related posts about as3

Related posts about actionscript-3