Solved

Assigning a Split Array to an ASP Multidimensional Dynamic Array

Posted on 2008-10-10
1
622 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

695 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