Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Occasionally hanging on a table with buffering
Message
From
19/01/2008 11:29:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
19/01/2008 11:14:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01283131
Message ID:
01283276
Views:
14
>Hilmar --
>
>Now, another related problem ...
>
>My users select the record they are to edit from clicking on a grid. Previously, they were able to sort the grid by clicking on the column heading. Now, that fails, because apparently its not possible to create an index on a buffered table (I can see the internal problems that would cause).

Oh, my, here is where it starts to get a little complicated. It is usually the framework that takes care of that.

I am not sure whether the problem is specifically with buffering; in this case, there might be a difference whether you use table buffering (5), or row buffering (3). If I remember correctly, the framework I use - Visual Extend - eliminates all temporary indices before saving records. There is an option, in the framework, to re-create indices right after saving.

>As for the mechanics -- what you described is what I assumed. I just have trouble understanding why it would make a difference whether its in LOAD or INIT. (If it could have been done it INIT, then it would be possible to pass parameters indicating, for instance, what file to edit.)

Oh, well, I would personally do all stuff related to table opening either in the DataSession, or in Load(). I don't know whether it might be done in Init(). I can imagine potential problems in the sense that controls get bound to the table, while it is not buffered yet: the event sequence is:
  • Form Load()
  • Init() for objects contained in the form
  • Form Init()

    For the second step, the table already has to be open, so the correct place to open a table would be Form.Load(), if you don't use the DE. With buffering, I would put it into Load() to be on the safe side, but I am not so sure about the details.
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Previous
    Reply
    Map
    View

    Click here to load this message in the networking platform