HA! Good Question. The circumstances were such that it really should have never happened. It was one of those "when a user clicks x and Venus is in retrograde" scenarios. So to answer you question: Once After that, I plugged the logic hole and put a "friendly" error in its place.
Mikel Taylor
Posts
-
The worst error message ever, ever -
The worst error message ever, everWhile a greenie, the following code was (accidentally) released into production: Messagebox: Title "Oops" Message: "Mikel Sucks as a programmer since this should never happen."
-
Why is VB being forsaken?...and automatic event wireups ;)
-
Why is VB being forsaken?sure we do. string builders and generics are our friends, yes. (but we use a "&" ... we reserve the "+" for addition)... funny you ask because as i jump from project to project, I find myself concatenating string in sql with the "&" and in vb with a "+" kind of like when your grandma would call you and rattle off a list of your cousins prior to getting your name right, lol
-
while (true) and for (; ; ) [modified]I hate to sound like a politician, but it depends. However, when there is a clear way to use "either," I personally prefer "for" looping. If working with object arrays, data rows, etc, I prefer to either check the count in an "if" block (or the UBOUND in the case of an array >-1) prior to the for loop. This approach allows you to predetermine iterations (if any are needed) at runtime- with your max value value being a variable. I usually reserve the use of "while" loops for conditions that are not numeric in nature... i.e. Fuzzier routines. In these cases, I usually place a boolean variable AND a counter out of the scope of the procedure and wrap a MAX If on loop iterations. I usually only go down this road if I am having to enumerate using self-calling recursion or something complex like that.
I float like a butterfinger & stank like a bee.