Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need array that each element is another array

Status
Not open for further replies.

angelpro

Programmer
Dec 20, 2011
6
I have the QnIJPositions structure created by me and an one dimension array QnNo(8) type of QnIJPositions.

Structure QnIJPositions
Dim QnRowPos As Integer
Dim QnColPos As Integer
End Structure

Dim QnNo(8) As QnIJPositions

And now I need another array of 92 elements that each element is a QnNo(8) array. How can I do that? Must I use a 3 dimension array? And how? I have never used in the past 3 dimension arrays.

I also thought another solution but I don't know if it's right.
I thought to create another data structure too like that

Stucture QnCombinations
Dim Qns () as QnIJPositions
End Structure

Dim QnSolutions(92) as QnCombinations

The problem here is that I can't declare the Qns array as static Dim Qns (8) as QnIJPositions but as dynamic and I am not sure if it will help me to the rest code and how will it affect. Any help and opinion will be much appreciated. Thank you in advanced.


 
ok... two thoughts.

One) Create a class that contains the objects you are needing.

Two) If I am reading the question correctly, A DataTable or DataSet with multiple DataTables with in. The Array Structure is already built, just add the "tables" and "Columns" as needed. You can reference the Rows and Columns by index number if you prefer.

These may not work for you, but hopefully will help spark a path towards an option that does suit your needs.

--------------------------------------------------
“Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month.” --Wernher von Braun
--------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top