Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace command throws me to eof
Message
From
25/10/2007 04:38:49
 
 
To
24/10/2007 16:38:02
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01262987
Message ID:
01263447
Views:
18
Hi Mike

>Ummmmm Terry
>
>I'm really against the idea of accessing properties directly in such a fashion.

Well I fell foul of using form props in SQL years ago and always assign them to a var in such.

It just so happens that I suspected similar here and had already assigned it to a var and tried that, to no avail. It seems my problems stem from having that Days_Op as part of the copmposite key on which the table was ordered, as I explained. Although I can't see why the file ptr should have moved, when I hadn't changed the value of Days_Op. I have no access methods on the prop. so no side-effects as you pointed out. Besides, in debug I would have caught that happening.

Thanks Mate

Terry

>
>First off, it is slower than using a memvar. Second, you can hook up access code to the property - which will fire at some point while the replace command is executing. If an access method fires a thisform.refresh and the refresh of some control does a GO BOTTOM... This just sounds terribly risky to me.
>
>Do you have any access method on THISFORM.cOpDays?
>
>>Yes. I first noticed that after I'd set some look-up FKs from listboxes, on the INFOBASE rec (textbox shows the key and listbox shows the look-up text name), and saved, the values disappeared from the record. These are chronological journey records pertaining to a parent ROUTE. There may be many of them for each Route, all maybe practically identical save for their start and end times, so I'd not noticed the rec changing in the past (if it did).
>>
>>So when I checked the list page of the form I found that i'd gone to eof(). Recs near the bottom of the table had got the values I'd just edited in. I thought I'd found the flaw in my class save logic and fixed this. Further tracing found this command was the culprit.
>>
>>>Does it happen if you don't have Browse open?
>>>
>>>>UPDATE: I can confirm that this line of code does not fire a trigger :-?
>>>>
>>>>>Do you have a trigger on the table?
>>>>>
>>>>>>Hi Sergey. Thanks
>>>>>>
>>>>>>No it's a well-established database table
>>>>>>There is no timer in operation
>>>>>>
>>>>>>>Is it a free table? Do you have a timer that could move pointer?
>>>>>>>
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform