Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 142
  • Last Modified:

Array/Memory Limitations of VB

I have 2 flexgrids displaying 2 months worth of reservations along my x axis.  Each reservation is a user-defined type that is about 300 bytes.  There is a maximum of 62 reservations.  (300*62) = roughly 20k.

Along the y axis I have 20 units.  Each unit is a user-defined type that is about 100 bytes.  (100*20) = roughly 2k.

I need to have fast access to the information in each reservation and/or unit on the click of that object.  I would like to store all this data in an array, but I understand VB has a limitation of 64k?? when it comes to arrays.  

This form would need 20 Units (40 K) * 62 Reservations (20K) per Unit.  A rough estimate is that I need 800k of memory.  Obviously arrays are not going to work based on what I've been told.  Is there an easier solution to this problem??  I'm scared that loading a recordset and accessing it on click is too slow, but maybe this is not the case.  Any advice would be helpful, thank you.
1 Solution
Have u tested it that u can only put 64k in an array ?

I just tested it with an array of 10.000.000 of the type long. The long type is 32bit = 4 byte i also filled it with long types to make sure.

that means 10.000.000 times 4 bytes, it it worked, so i guess the 64k isn't correct.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Tackle projects and never again get stuck behind a technical roadblock.
Join Now