I assume you are doing this from a Flex application. Are you using BlazeDS or 
LCDS on the server side? There are many good examples on Adobe Dev Net that can 
help you out. http://www.adobe.com/devnet/flex/quickstart.html is a good place 
to start. 

You are not going to store your array in the DB directly, but the objects 
contained therein unless you are using LCDS data management services. If you 
are using LCDS, you can use managed collections. The framework will take care 
of synchronizing changes in a grid or managed collection back to the server. 
GraniteDS is free and also supports this. 

If you are using the free BlazeDS solution from Adobe, you should check out 
using spring on the J2EE server side, 
http://coenraets.org/blog/2009/05/new-update-to-the-spring-blazeds-integration-test-drive/

Finally, check out the Tour De Flex AIR application as well for some good 
examples.

--
Eric Garza
Technical Architect, Adobe Professional Services
Adobe Systems, Inc.


Flex 
--- In [email protected], Laurence MacNeill <lmacne...@...> wrote:
>
> Ok, I think maybe I'm over-thinking this and confusing myself...  But 
> how do I store an array in a Database?
> 
> I have an array 'demographics[]'  with 25 elements in it (0 thru 
> 24).  I can certainly use a for-loop to loop through each element and 
> do whatever I want with each element.  But when it comes to storing 
> them in the database, I'm at a loss.  I have 25 strings in the DB, 
> named demo1, demo2, ... demo25.  I can't access them using the same 
> type of for-loop syntax that I'm using to access my array, so how do 
> I copy the array into the database?  And read it back out again?
> 
> Is there no choice but to do something like this:
>      my.DB.reference.demo1 = demographics[1];
>      my.DB.reference.demo2 = demographics[2];
>      ...
>      my.DB.reference.demo25 = demographics[25];
> 
> 
> That seems terrible, but it's the only way I've figured out how to do 
> it so far.  There's GOT to be a better way.  Please help.
> 
> 
> Laurence MacNeill
> Mableton, Georgia, USA
>


Reply via email to