Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pb with table buffering and datassesions when INDEXING

Status
Not open for further replies.

thomascd

Programmer
Mar 20, 2002
29
0
0
GB
when I have the same form opened twice in a multi user environment, I am getting a crash when indexing a table in the second opened form at this part of the code:
IF CURSORGETPROP("Buffering") = 1
INDEX ON &cOrderField TO (NdxFile)
ENDIF
I get an error message:"command cannot be issued on a table with cursors in table buffering mode"
The buffering mode is actually 1, which is not table buffering mode, so I believe the error is misleading.
Is this happening because the same table is opened in another datasession but with a buffering mode !=1 but =5 ??
 
thomascd

1.I'm wondering if it is not a design issue. How can you have the need to index a table in a multi-user environment?

Is this happening because the same table is opened in another datasession but with a buffering mode !=1 but =5 ??

Since in order to index a table it requires the table to be opened exclusively, if the same table is opened in another datasession, that would be a problem. Exclusive means just that no one else has the table opened.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks,
why would that be a design pb to feel the need to index a table in a multi user environment ? In my case this is required on search form with a grid which the user can order the columns as he wishes.

I think you've got a point here with table opened exclusively, but the index operation was working well although the table was opened in another datasession if the table was in the same buffering mode.
 
thomascd

Is it a case of the CURSORGETPROP() might be looking at the wrong table? You may want to add the alias as the second parameter.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
No, it is looking at the right table.
It is not speicifed in the vfp doucmentation that the table sould be opened exclusively for indexing, or is it ?
 
It is not speicifed in the vfp doucmentation that the table sould be opened exclusively for indexing, or is it ?

o, it is not indicated, but I'm wondering waht happens to the "other" table, when you index version 1 of the table. Opening it excusively might guarantee a proper indexing. But for your search on your grid, does it have to be the actual table? Can you use a cursor? Or is there data entry happening?

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Sorry this should read:
No, it is not indicated,

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top