Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-18-2010, 04:12 PM   #1
Registered User
Join Date: Jun 2006
Posts: 2
Default SQL parameters in AIR...

Any ideas why using parameters with the IN() clause fails to run, but manually changing the SQLStatement text works....

"DELETE FROM main.Messages WHERE guid IN (:guids)"

And then set the :guids parameter to a csv list of string guids...

ActionScript Code:
var guids:String = "'" + myGuidsArray.join("','") + "'"; //makes '12345','54321',abcde','edcba' myStmt.parameters[":guids"] = guids;

The above fails to effect the database, but manually make the string - like this...

ActionScript Code:
myStmt.text = myStmt.text.replace(":guids", guids);

and it works fine!

Any ideas? Is it a bug?

mattbryson is offline   Reply With Quote
Old 01-22-2010, 04:47 PM   #2
Gamefun Engineer
Join Date: Nov 2009
Posts: 233

Only thing I can think is that maybe you need to escape your single quotes so you get this '\'12345\',\'54321\',\'abcde\',\'edcba\'' instead of '12345','54321','abcde','edcba'.
NoobsArePeople2 is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 04:19 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.