Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxpro for Windows 2.6a bug?
Message
From
18/04/1997 11:05:32
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00028856
Message ID:
00028871
Views:
35
>Just to let others know I recently had a problem with updating my dataing in a program that turned out to be a foxpro bug in 2.6a for windows. The program exerpt is:
>
>SELECT actslot
>LOCATE
>SCAN FOR qtydiffoms = 1
> SELECT oms1
> LOCATE FOR nsn = actsnsns.nsn
> IF EOF()
> RELEASE WINDOW waitmsg
> =errormsg("Analysis Error!!")
> CLOSE DATABASES
> *
> * Call the function to set up the acts tables again
> DO setuptables
> RETURN
> ENDIF
> * Count how many qtys we will have and total
> SELECT oms2
> COUNT FOR exp_1 = oms1.exp_1 TO mhowmanyoms2
> SUM qty FOR exp_1 = oms1.exp_1 TO mtotomsqty
> * How many actsqtys do we have
> SELECT actsqtys
> COUNT FOR lotindex = actslot.lotindex TO mhowmanyqtys
>
> REPLACE actslot.quantity WITH mtotomsqty
> *
> * Flag the record to show we did something
> REPLACE actslot.newqty WITH 3
>
> SELECT actslot
>ENDSCAN
>
>The bug is that the replace statements at the end of the scan did not happen. No error was produced, the program just continued on. I was able to duplicate this error in the command window by having two tables open and doing a sum on the second table and asking to replace a field in the first table using the statement:
> REPLACE actslot.quantity WITH mtotomsqty
>I had both tables open in a browse window so I could see if any changes occured, but nothing happened to actslot table. If I selected the actslot table, then the replace worked. I think it had to do with the SUM before a REPLACE using a table qualifier (actslot.).
>To remedy this bug I inserted a SELECT actslot before the replace statments and it worked fine.
>
>The fields to be replaced in actslot were numeric 10 no decimal.
>
>Hope this helps someone else or someone can add to it, because it is a pretty serious bug if you dont catch it.
>
>Bret

I believe that you are running into a known bug. The bug is if the currently selected area is eof() then a "REPLACE otherarea.field..." doesn't work
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform