Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One to Many problems
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00048501
Message ID:
00049108
Views:
57
>>>Solved my own problem. I had been playing around with config.fpw settings and forgot to SET MULTILOCKS ON. There ya go Colin....Thanks Colin....No problem Colin. :-)
>>>
>>>>I have a one to many relationship on a form of courses and students enrolled. The form contains the fields for the course and a grid to display the students. When I test the form in VFP and skip through the courses it works fine. However, in the EXE when the form loads it shows the first course and all the students, but when I skip through the courses I get the course and only the first student showing in the grid. When I check the course table after this there is a 'ghost record' copy of the first record that I can't access in a browse. If I delete the original course then the ghost record disappears as well.
>>>>
>>>>For buffering, the course table is Pessimistic Row and the student table is Optimistic Table.
>>>>
>>>>Any ideas?
>>
>>If you are using the default data session, putting SET MULTILOCKS ON in the config file could be OK. If you are using Private datasessions though, you will want to remove it from there and implement it somewhere in the form as this is one of those commands that needs to be set for each data session.
>>
>>Steve
>
>Hi Steve,
>
>I'm not entirely sure but if I am establishing my cursors, views and relationships in the DE of a form is this not a private data session. If so, MULTILOCKS=ON in the config.fpw seems to be fine. Thanks for the input and please correct me if I've got the wrong assumption.

Colin,

Nope, you've got it right. As long as you are using the default data session,
things should be just fine. But I'd consider moving that line of code anyways because you never know when a private data session will be needed. In my form base class from which all forms are derived, I have a .SetEnvironment method that is called from each instantiation of a form. This method, as it's name implies, sets the initial environment for the form. If you look at the SET DATASESSION command in Help, you'll see the entire list of items that are scoped to the current data session.

Steve
Previous
Reply
Map
View

Click here to load this message in the networking platform