Skip to main content
Inspiring
December 10, 2007
Question

Recordset Array

  • December 10, 2007
  • 1 reply
  • 202 views
Hi,

I need to format a recordset into a particular format i.e.

Dim myDataStore

MyDataStore = ...

so that myDataStore =

[ 'record1field1',
'record1field2','record1field3','record1field4','record1field5'], [
'record2field1',
'record2field2','record2field3','record2field4','record2field5'], etc

I can do this OK for 1 record and know I need so kind of loop but am not
sure how to go about for the whole recordset?

Any ideas?

Thanks!

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Inspiring
December 11, 2007
Sounds like you want a for loop

asp has for each construct
php has foreach and a while construct


for a while loop you need to know how many records you are going to
process into memory (the array)






MM User wrote:

> Hi,
>
> I need to format a recordset into a particular format i.e.
>
> Dim myDataStore


>
> MyDataStore = ...
>
> so that myDataStore =
>
> [ 'record1field1',
> 'record1field2','record1field3','record1field4','record1field5'], [
> 'record2field1',
> 'record2field2','record2field3','record2field4','record2field5'], etc
>
> I can do this OK for 1 record and know I need so kind of loop but am
> not sure how to go about for the whole recordset?
>
> Any ideas?
>
> Thanks!



--