>>check CursorGetProp("buffering") - if it returns 4 or 5, then the cursors are table buffered.
>
>Yes, I know, but does this also cover cursors open in other datasessions?
>
>The error only occurs when I have two or more forms open simultaniously and when both forms have open cursors of the same table. The offending command is an "index on ..." statement to make a temporary index on a field in a related table. The error occurs if the related table is also open in another form.
OIC.
No, it only works on cursor in the current data session.
Two approaches you could take
- If your app has some sort of form manager, then you can add something to it to go through open forms and see if the given cursor is open and table buffered - ugh :)
- Use views for the related tables instead, then you can add temp indexes on the view to your heart's content - or limit the view itself with view parameters.
I suggest the last approach.
Insanity: Doing the same thing over and over and expecting different results.