title: VBScript create a multi-dimensional array and add to it?
body: <p>This is a doozy for me haha, I've pretty much checked nearly every page on Google Search and I still don't quiet understand how to do it.</p>
  
  <p>I want to create a multi dimensional array in VB Script called data2. 
  Trying the examples that I've seen but I'm getting a "Subscript out of range" error</p>
  
  <pre><code>Dim data2()
  
  sub grabdata
      SQL_query = "SELECT * FROM MSAccess_table"
      Set rsData = conn.Execute(SQL_query)
      Do Until rsData.EOF = True
          ReDim Preserve data2(UBound(data2) + 1)
          data2(UBound(data2)) = Array(rsData("id"),rsData("column_1"),rsData("column_2"),rsData("column_3"),rsData("column_4"))
      rsData.moveNext 
      Loop
  end sub
  </code></pre>
  
  <p>Basically I'm trying to learn how to make a multi-dimensional array in VB script and add to it with a loop. What are some basic examples that can work in my case?</p>