From: MM on 18 Jun 2010 10:51 On Fri, 18 Jun 2010 12:12:18 +0100, Dee Earley <dee.earley(a)icode.co.uk> wrote: >Yes, there appears to be a bug in that grid that means it can't handle >more than 65Ki entries, but that most likely means it is VERY >infrequently used in that situation. No "appears" about it! It's a bug. Microsoft acknowledged it as such. MM
From: Helmut Meukel on 18 Jun 2010 16:45 "MM" <kylix_is(a)yahoo.co.uk> schrieb im Newsbeitrag news:tr1n169rn6vaujuh7fonjbfkn1ep951s97(a)4ax.com... > On Fri, 18 Jun 2010 12:12:18 +0100, Dee Earley > <dee.earley(a)icode.co.uk> wrote: > >>Yes, there appears to be a bug in that grid that means it can't handle >>more than 65Ki entries, but that most likely means it is VERY >>infrequently used in that situation. > > No "appears" about it! It's a bug. Microsoft acknowledged it as such. > > MM It's a bug, true. And the MSFlexgrid has it too, not only the Datagrid and the MSHFlexgrid. With the older Flexgrid I got an error when I tried to add 50,000 additional rows to a 2 column grid with already 150,000 rows ("can't allocate memory for flexgrid"). But you *can* scroll down just fine by clicking on the scrollbar. I tried it with a 1,000,000 rows MSHFlexgrid. <g> Dragging is what doesn't work. It seems that somewere deep inside the grid, the scrollbar does use a long, but then it's casted to an unsigned int, ignoring the higher bits. This unsigned int is then used to position grid rows and scrollbar. In effect it's like a Modulo 65536 of the value you dragged it down. BTW, it's not the only control with problems related to the use of integers instead of longs. Try a Listbox: - you can easily add some 100,000 items to a listbox. - if you select an item by clicking on it, try to get the associated ListIndex value. for item 32768 you get ListIndex = 32767 (Listindex starts with 0) for item 32769 you get ListIndex = -32768, and so on ... for item 65536 it's Listindex -1, for item 65537 it's Listindex 0, for item 65538 it's Listindex 1 and so on ... Using the ListIndex, you can only access items up to Listindex 32767 because VB happily displays the higher unsigned int values as negative values but refuses to accept these negative values. I suspect Windows provides internally a long and the higher bits were simply ignored. Helmut.
From: MM on 19 Jun 2010 02:48 On Fri, 18 Jun 2010 10:05:47 -0500, dpb <none(a)non.net> wrote: >Whether it's a "bug" in your opinion or not doesn't really change that >it is a limitation and it ain't agonna' go away nor that the design to >use more than 64K entries in a grid in a UI is not an effective >presentation method. It is not a "bug" in quotes (which implies it isn't one), since Microsoft acknowledged that it is a bug in one of their support missives. And why won't it be fixed? Microsoft has been releasing updates to VB6 until fairly recently and may even now still be doing so for Vista and W7. And displaying way more than 64k of entries is perfectly feasible when you have MergeCells set to true and you apply a Pattern/Replace across the rows with vsFlexString. I have a form (now using vsFlexGrid, since MsFlexGrid/MsFlexGrid are broken) whereby I'll get as many as 400,000 records in the grid, but these are reduced to 2,000 rows after MergeCells and some awking. And using GetMergedRange can quickly extract these 2,000 into a separate view. Another example: 90,000 rows condense down to maybe 40. MM
From: MM on 19 Jun 2010 02:51 On Fri, 18 Jun 2010 22:45:15 +0200, "Helmut Meukel" <Helmut_Meukel(a)NoProvider.de> wrote: >"MM" <kylix_is(a)yahoo.co.uk> schrieb im Newsbeitrag >news:tr1n169rn6vaujuh7fonjbfkn1ep951s97(a)4ax.com... >> On Fri, 18 Jun 2010 12:12:18 +0100, Dee Earley >> <dee.earley(a)icode.co.uk> wrote: >> >>>Yes, there appears to be a bug in that grid that means it can't handle >>>more than 65Ki entries, but that most likely means it is VERY >>>infrequently used in that situation. >> >> No "appears" about it! It's a bug. Microsoft acknowledged it as such. >> >> MM > > >It's a bug, true. And the MSFlexgrid has it too, not only the Datagrid >and the MSHFlexgrid. With the older Flexgrid I got an error when I >tried to add 50,000 additional rows to a 2 column grid with already >150,000 rows ("can't allocate memory for flexgrid"). > >But you *can* scroll down just fine by clicking on the scrollbar. >I tried it with a 1,000,000 rows MSHFlexgrid. <g> >Dragging is what doesn't work. > >It seems that somewere deep inside the grid, the scrollbar does >use a long, but then it's casted to an unsigned int, ignoring the >higher bits. This unsigned int is then used to position grid rows >and scrollbar. >In effect it's like a Modulo 65536 of the value you dragged it down. > >BTW, it's not the only control with problems related to the >use of integers instead of longs. >Try a Listbox: >- you can easily add some 100,000 items to a listbox. >- if you select an item by clicking on it, try to get the > associated ListIndex value. >for item 32768 you get ListIndex = 32767 (Listindex starts with 0) >for item 32769 you get ListIndex = -32768, and so on ... >for item 65536 it's Listindex -1, >for item 65537 it's Listindex 0, >for item 65538 it's Listindex 1 and so on ... >Using the ListIndex, you can only access items up to Listindex 32767 >because VB happily displays the higher unsigned int values as >negative values but refuses to accept these negative values. >I suspect Windows provides internally a long and the higher bits >were simply ignored. > >Helmut. Yes, well, Microsoft's glitzy exterior was never intended to provide a fundamentally reliable engine underneath... ; Bells and whistles are what sells. I mean, what about that 350,000 maximums cells restriction in MsFlexGrid? Was this stipulated by VideoSoft in order to get its foot in the door at One Microsoft Way, without having to give away the crown jewels? MM
From: David Kaye on 19 Jun 2010 04:38
MM <kylix_is(a)yahoo.co.uk> wrote: >The good software is the kind that doesn't have a bug that prevents >rows past 65,535 from being viewed. The first version of the grid had a built-in limit of what, 2048 rows? Something like that. I'm in awe that you and whoever else can't see that populating a grid with 65000 records is lunacy. Nobody can read all that. With more than a few dozen rows people eyes begin to glaze over. It's just laziness. Instead of writing code to sub-select out of the recordset you're just taking the easy way out. A good coder considers the user, not the ease of writing the code. I have a database listing upwards of 100,000 songs. There is no way in hell that my software is ever going to show all the songs at once. I wouldn't dream of subjecting a user to such a body-slam of data. The recordsets are subselected by criteria such as artist, year, genre, etc. |