I am developing an application in Adobe Flash Builder 4.6 (AIR APP) in which a user fills forms and stores data like name, phone, address (along with some report data) in Local SQL Database.
My coding is all Okay but have a just one problem. Along with data, there is an array which I am trying to store on Local SQL Database, but my all attempts have failed.
I store array in text datatype in database and when I access the stored array it give an error.
Cannot convert "[object Object]" to Array.
I dont know what is the problem.
Please Help ... Thanks.
I use array with nested array like.. My array is
var ar:Array=["report_name", {label: report_label, number: 5}, [{label: Label1, data: Data1}, {label: Label2, data: Data2}, {label: Label3, data: Data3}]];
Now I store this array in database like.
sqlstatement.text ="INSERT INTO table (id, data) VALUES ('', '"+ar+"')";
In this statement data has TEXT datatype.
Now when I access it like
var array:Array = [];
array = Array(sqlstatement.getResult().data[0].data;
It give coercion error.