Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Recordset Array

LEGEND ,
Dec 10, 2007 Dec 10, 2007

Copy link to clipboard

Copied

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!

TOPICS
Server side applications

Views

180
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 11, 2007 Dec 11, 2007

Copy link to clipboard

Copied

LATEST
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!



--

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines