>Hi,
>
>I have a line of code in my program which has a comment dating back to 2002 and refers to a bug in VFP 6.
>
>Here is the line with the comment:
>
>*** 11-18-2002 REFACTORING. Calculate QTY In Stock (in INVSTOCK) and update field INVNTORY.INSTOCK
>*** Note: Using SUM() function instead of SQL Select because of bug in VFP 6.0
>SELECT (cInvenStockView)
>SUM QTY_LEFT to nQtyInStock for REC_ID = "1" AND INVEN_PK = tnInvenPk
>
>
>The code above should calculate the sum of field QTY_LEFT. Which could be done by SQL Select from the Cursor Adapter cursor.
>
>I know I should know why I used SUM instead of SQL Select. But can someone remember what was the bug? And should I now (since the program is in VFP 9) change the above code from SUM to SQL Select?
>
>TIA
The reason I am asking the question is I have come across a case (actually a customer) that the line above (the SUM) did not work correctly. But I cannot duplicate it on my PC.
Of course, it could be a bug where the CA did not select the records accurately. Or it could be a problem with SUM in VFP 9. I am trying to figure what is the problem.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham