var obj2:ByteArray = result.data[0]["USER"] as ByteArray; obj2.position = 0; var yourUserVOInstance:userVO = obj2.readObject() as userVO;
*probably*... (the "as" cast operation will return null if the operation is not successful, unlike the ObjectToCastTo(someObject) form which will throw an error if it does not succeed. You may prefer to see the errors, at least it makes it clear what went wrong and where. probably a style thing, I guess) By convention, you'd usually want to upper-case the first letter of your userVO class to "UserVO", incidentally. -----Original Message----- From: [email protected] on behalf of markflex2007 Sent: Mon 25/08/2008 19:14 To: [email protected] Subject: [flexcoders] Sqlite retrive to object Hi, I have saved a object to sqlite. but I can not retrieve it back to same type of object. I use the following code,but obj1 is null and obj2 have data. but I need the data also save in obj1. var obj1:userVO = new userVO(); var obj2:Object = new Object(); obj1 = result.data[0]["USER"] as userVO; obj2 = result.data[0]["USER"]; Please help me and give me a idea how to fix it. Thanks Mark ______________________________________________________________________ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. ______________________________________________________________________
<<winmail.dat>>

