2d arrays?

Results 1 to 3 of 3

Thread: 2d arrays?

  1. #1
    Join Date
    Dec 1969

    Default 2d arrays?

    I&#039;m currently using getrows to return an array of results.<BR><BR>Basically I now want to loop through the array and only return the values from 2 columns from the array. Does anyone have any ideas how to do this??<BR><BR>I&#039;m using this code to loop through at the moment:<BR><BR> For lnRowCounter = 0 To Ubound(SectionArray,2) <BR> For lnColumnCounter = 0 To Ubound(SectionArray,1)<BR> Response.Write SectionArray(lnColumnCounter, lnRowCounter) & ","<BR> Next<BR> Next <BR><BR>Table Structure looks like:<BR>SectionID<BR>Section_Parent<BR>Section_Pa th<BR>SectionName<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: 2d arrays?

    If you only need two columns, why not simply only SELECT those two columns?<BR><BR>Craig.

  3. #3
    Join Date
    Dec 1969

    Default Reaper is correct...

    ...the best way to get only two columns is to use the SQL SELECT to only *get* two columns.<BR><BR>But there is no reason you can&#039;t just use *some* of the columns.<BR><BR>Nobody ever said you *HAVE* to use<BR> For lnColumnCounter = 0 To Ubound(SectionArray,1)<BR><BR>If you only need columns 1 and 2, for example, just do<BR> For col = 1 To 2<BR><BR>If you need columns 0 and 3, then do<BR> For col = 0 To 3 Step 3<BR><BR>etc.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts