Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why didn't rec pointer move to newly appended rec
Message
From
25/10/1997 00:02:44
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
 
 
To
25/10/1997 00:00:54
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00056291
Message ID:
00056668
Views:
39
>>>>>By the way, thanks. Exactly what you said, the child table pointer was reset because my navigation class selects my master table on refresh. I will try to see how I can solve the problem.
>>>>>
>>>>>Just a sidetrack, when I have parent-child-grandchild form with the child and grandchild in grid, the grandchild is not set to table-buffering automatically by VFP. Is this by design? My form is set to optimistic.
>>>
>>>Yes, this is by design. Just re-set the grandchild's buffering in the data environment.
>>>
>>>>
>>>>I have a part of the coding as follow:
>>>>
>>>> APPEND BLANK
>>>> REPLACE pagr_key WITH pa_grade.pagr_key, roll_no WITH cRoll_no
>>>> nWorkarea=select()
>>>> nrecno = recno()
>>>> THISGRID.REFRESH()
>>>> select (nWorkarea)
>>>> go (nrecno)
>>>>
>>>>I got the error 'record is out of range'. I have checked that the table before append and after refresh is the same (by using messagebox) and that the appended rec no is -ve. What can go wrong?
>>>>
>>>>This is bad... I hope you can give me some clues.
>>>>
>>>>Thanks.
>>>
>>>Tai, try it without the () on the GO (nRecno) line.
>>>
>>>Also, is there a tableupdate in your Refresh code? That would change the negative recno to a positive one. Check the actual recno() with your message boxes or with debug.
>>>
>>>Barbara
>>
>>Gives me same error without the (). When I suspend, the rec number is -1 which is the rec number for the newly appended record. However, the current alias() is the grandparent's alias. The workarea is the grandchild's workarea. The SELECT (nWorkarea) not working? Very strange. Really hard to debug with this kind of result.
>>
>>What on earth is going on?
>
>Maybe while I suspended, the form lostfocus and executed some codes? Anyway, while I was suspended, I issue 'SELECT 1' and 'SELECT (-1)' at command line and it is working. But if I issue 'SELECT -1', it gives me the same error. Can this be related to the problem? If it is, any way I can overcome it.

Sorry 'SELECT 1' and 'GO -1' vs 'SELECT 1' and 'GO (-1)'
Previous
Reply
Map
View

Click here to load this message in the networking platform