Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Assigning a Split Array to an ASP Multidimensional Dynamic Array

Posted on 2008-10-10
1
Medium Priority
?
624 Views
Last Modified: 2012-05-05
Hi,

I have a recordset with a single column, where each cell contains a number of tilda separated values, for example:
| one~two~three |
| four~five~six |

which I want set up into a two dimensional array, ie:
| one | two | three |
| four | five | six |

I keep getting 'Subscript out of range: 'arrArray'' error, and I assume I am doing something fundamentally wrong - can anyone help out please?

Thanks in advance!
~ Bob
If Not(objRefCursor.eof) And Not(objRefCursor.bof) Then
		
    ReDim arrArray(objRefCursor.RecordCount, nColumns)
		
    For nRowCount = 0 To nRows
        arrArray(nRowCount) = Split(objRefCursor(nRowCount), "~")
    Next
			
  End If

Open in new window

0
Comment
Question by:FrostbiteXIII
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
FrostbiteXIII earned 0 total points
ID: 22685754
Looks like I just missed the second index from my arrArray line... Bah...

This seems to (roughly) work, for anyone else needing it.
If Not(objRefCursor.eof) And Not(objRefCursor.bof) Then
                
    ReDim arrArray(objRefCursor.RecordCount, nColumns)
                
    For nRowCount = 0 To nRows
        arrArray(nRowCount, 0) = Split(objRefCursor(nRowCount), "~")
    Next
                        
End If

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question