At 06:26 PM 5/15/2009, you wrote:

>How that is different from a database table with 25 rows?

Because it just is.  LOL  With 25 rows, you have 25 separate 
records.  This is 25 columns within a single record.  There are other 
columns too, not just these 25.


>You populate your array from that table, use the array as a 
>datProvider and save changed data back to db. Am I missing something here?


I'm missing something here, obviously -- I have no clue how to do 
what you just said.

My problem is, I want to reference each demoX column in the database 
using something like array notation: 'demo[i]' where i is in a 
for-loop from 1 to 25.

But you can't reference database columns that way -- you have to use 
hard-coded strings.  (ok, I don't know how to do it *without* using 
hard-coded strings, let me put it that way.)

So how do I for-loop my way through that?  Maybe I'm not explaining 
myself well.  But I don't know how else to explain it.

L.



>--- In 
><mailto:flexcoders%40yahoogroups.com>[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
> >
>
>
>
>No virus found in this incoming message.
>Checked by AVG - www.avg.com
>Version: 8.5.329 / Virus Database: 270.12.31/2116 - Release Date: 
>05/15/09 06:16:00

Reply via email to