That could be it you know! Nice reasoning :).
Although, it could also be that the guy had just had a bad day and wanted to screw things up for people in the future...
dcollis
@dcollis
Best posts made by dcollis
Latest posts made by dcollis
-
RE: You will not have any more records from this database! No!
-
RE: You will not have any more records from this database! No!
The dll is also used to return rows to an excel spreadsheet - yes.
However the maximum number of rows in excel is 65536 (i believe...or at least it was). I can't believe it was as low as 1820? Anyone?
Either way - the code is old... but not that old i don't think. 5 years max at a guess i would say. -
You will not have any more records from this database! No!
Wasn't sure if this was front page material or not... so decided to post here anyway - mainly to see if anyone could explain it to me... I get the feeling that (mainly as i'm not a vb programmer) there might be a reason for this one.
Anyway, here it is:
I work as a consultant at an investment bank. Today I was asked to fix a problem with a trading application.
The application had a function that allowed a user to type in a select query to pull out information from a database. The whole application was a bit of a mess - using a visual basic dll written as a "quick solution" a long time ago. So reluctantly (not being a vb programmer), I took a look.
The problem was that no query on a database would return more than 1820 rows...
This has been a major problem for months apparently. And the users had been writing work-arounds such as select ... where id > 1820 to pull out extra information.
I open the dodgy vb code for what I expect to be a lengthy debugging session of horrible code and the very first thing I see is:
If ((numrows > 1820) And SpdSheet) Then numrows = 1820
'this is the limit that an array can take
myarray = myRecord.GetRows(numrows)
So some programmer decided to limit the results returned for everyone and enter in the spurious reason that "this is the limit that an array can take"... which is of course : bollocks.
Fixing it so quickly made me look good though. I didn't bother telling them how.
Note: I did do a search on google and could find no evidence of vb using odbc having any kind of limit ever on number of rows returned... I did think that the programmer could have had a legitimate reason for doing this... perhaps someone could explain my "wtf?".