MSFlexGrid and Row cap

Thanatos
09-03-2003, 11:49 AM
Is there a limit to the amount of rows a msflexgid can handle? I'm getting an out of memory error when i hit 12962 rows. I have 27 cols so that means i can only get a grand total of 349947 unique cells. Does this number mean anything to anyone? Any ideas? Thanks in advance.

00100b
09-03-2003, 01:39 PM
From MSDN

The minimum number of rows and columns is 0. The maximum number is limited by the memory available on your computer.

Thanatos
09-03-2003, 01:43 PM
That's strange because the MSFlexgrid says that i can't have more than 12962 rows but when i tried the same routine using an MSHFlexgrid i had no problems. Could it be that this quote from MSDN is refering to MSHFlexGrids and not MSFlexGrids?

00100b
09-03-2003, 01:47 PM
I think it applies to both.

Are you sure that resources didn't get freed up.

If there was a magic number associated with a limitation, I would expect it to be the equivelant of either a signed or unsigned integer and not an arbitrary number of 12,962.

Thanatos
09-03-2003, 01:55 PM
Well the magic number for MSFlexGrid seems to be 349974 ( the numbre of unique rows) If i decrease the number of columns then i can increase the number of rows proportionally. If you have a second, create a new form and place an MSFlexGrid on that form. Then open the property page and designate 27 cols and 12963 rows. It should give you an error. Then try it again this time using an MSHFlexGrid.

00100b
09-03-2003, 02:07 PM
You have proven my (and MSDN's) point. It is a matter of the available memory. Whether the MSHFlexGrid uses memory more efficiently then the MSFlexGrid doesn't eliminate the fact that the maximum number of rows and columns allowed is limited by the available memory.

Thanatos
09-03-2003, 02:26 PM
But how is it that i have the same exact limitations on two different machines with two different amounts of memory? One with 512 MB Ram and the other with 650 MB Ram. Did you get the same limitations?

00100b
09-03-2003, 02:33 PM
There really isn't a large difference in memory between 512 and 650.

No I didn't get the same limitations. I couldn't even get up to 349K rows with 1.3GB of memory, but then again, I wasn't willing to shut down all of the programs that I had opened just to prove a point that I know I'm right.

Last time, and believe me.
The maximum number of columns and rows allowed in either a MSFlexGrid or a MSHFlexGrid is limited by the amount of available memory.

Thanatos
09-03-2003, 02:35 PM
Well thanks for your time.

Thinker
09-03-2003, 02:38 PM
Maybe you can explain what human can possibly look at and process a
grid of information with 349974 cells???

Thanatos
09-03-2003, 02:44 PM
Datacollection that will run for days on end. Collecting every one minute for 9 days will create someting of this size.

00100b
09-03-2003, 02:46 PM
You may want to consider collecting the data to a database and then if somebody needs to see pieces of the data, then provide an interface.

Thanatos
09-03-2003, 02:49 PM
I've thought about that, but the only problem is the VB is just a viewer. The software that is actually doing the collection (from a third party) writes the data into a tab delimted text file.

Thanatos
09-03-2003, 02:56 PM
Well it's quiting time. Thanks for all your help guys.

00100b
09-03-2003, 03:07 PM
Maybe you could capture the file each day, let it start over with a new file, and import the captured file into a database.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum