Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with cursor names in VFP 9
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01057970
Message ID:
01058487
Views:
15
Thanks for the suggestion, Mark. Thi sparticular process has both kinds of cursors. (Cursors? We got cursors!) I added NOFILTER to all the SELECT INTO CURSOR calls, but the results are still the same.

I have satisfied myself that this is a VFP 9 (or maybe VFP 7 or 8) issue in some way. I copied the data to my VFP 6 environment and the process works fine there. That particular program is unchanged. It is a beast of a program -- lots of tables (and cursors, did I mention cursors?), fields, and arcane calculations. There are also some pre-VFP artifacts like SAY/GET fields and SHOW GETS commands in the Refresh method, which goes on for over 100 lines of code. Sigh. I am going to knock out the remaining issues and come back to this one last.

I have not been on here much lately. How did your plans for the Katrina relief effort go? I was in Houston three weeks ago, part of a group of 17 from Chicago and 41 from San Diego. We did a little bit of good -- like about a teaspoon in an ocean -- before our project was cut short due to Hurricane Rita. We were there Sunday through Wednesday instead of Sunday through Saturday, then joined the mass exodus on I-45 north out of Houston. I don't know that we put much of a dent in the damage Katrina had done, but it was something. Quite an experience.

Best memory -- one day we were sorting and organizing relief supplies that had come into a warehouse from all over the country. Just seeing all the zip codes was inspiring. Some of it was from corporations -- an entire aisle of new shoes from Nike, two pallets of Monopoly games, countless truckloads of bottled water -- and some was from small, private groups. I was going through a box in the latter category and came across a teddy bear, well used. A note in little girl handwriting was affixed to the bear's right ear with about a roll of Scotch tape. "He is my favorite," it said.

This was not by any means a Hallmark feel-good trip, not after seeing so many people at the Astrodome complex and elsewhere who had lost everything they couldn't carry, but it did reaffirm my basic faith in humanity. When bad things happen, people come through.


>Is this really happening with cursors created with the CREATE CURSOR command, or just those created by a SQL command? If the latter, try adding NOFILTER to the end of your SQL commands.
>
>>There has been a behavior change between VFP 6 and VFP 9 which handles cursors slightly differently, and I think is causing my problem. In VFP 6 cursor files were created in 8.3 format. That is no longer the case. I am seeing file names in 13.3 format, e.g. 00002m89000cz.tmp (or .cdx if the cursor gets indexed). Furthermore, I see from tracing this particular process that the first 8 characters of different cursor file names -- of which this process has six open at the point where it is acting weird -- are non-unique. So there are other cursors named 00002m89000p2.tmp, 00002m89000t2.tmp, etc.
>>
>>I think what is happening is VFP 9 is getting these files mixed up. I am seeing VERY odd behavior while debugging this. One time through it will say one cursor (alias) is not found. The next time maybe it works okay. Then it says a different cursor is not found. One time I flipped over to the VFP window and switched work areas to browse one of the cursors. After doing that, reselecting the previously selected work area, and going back to the debugger window, I quickly got an error saying a cursor that was not involved in any of this, one created much earlier, was not found.
>>
>>I may have to do what you did, using tables instead of cursors, but hope it doesn't come to that. This application has cursors up the ying-yang so it would be a lot of code changes and testing. Making matters worse, it runs most of the time with error handling turned off (see no evil, hear no evil, speak no evil....) so problems often don't show up until later -- the program just continues on its merry way before failing somewhere else.
>>
>>Do you happen to know if there is a way to make VFP 9 create cursor files in 8.3 format?
>>
>>Thanks to all who have been helping!
>>
>>Mike
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform