Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ever been bitten by this?
Message
De
01/02/2002 07:10:56
 
 
À
01/02/2002 06:23:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00613869
Message ID:
00613894
Vues:
17
Hi Hilmar

>This "feature" has been known for quite a while. Each datasession is supposed to work as independently as a separate user, but it doesn't, I'm sorry to say. AFAIK, this unwanted "sharing" only happens with the ASC/DESC case.

Not so, it also happens if you use stand-alone IDX files - in fact, as Barbara Peisch found out ages ago, you can get yourself into a real mess if use them when their tables are open in multiple data sessions. I had some stuff in Kilofox about this (I quote):

------------------------------------------------------------------------------
... an IDX file is available in all data sessions, irrespective of where it was created. This behavior leads to some very peculiar results if you try use the index in one data session while the table to which it relates is opened in table buffered mode in another. The good news is that Visual FoxPro will trap for this situation, but the bad news is that it reports it with error number 1579 which states that:

"Command cannot be issued on a table with cursors in table buffering mode"

This can be disconcerting when the command is SET INDEX TO and the table for which you are trying to set the index is definitely NOT using table buffering! Furthermore, if you are using multiple data sessions and a table is opened using table buffering in any of them, you cannot even create a stand-alone index on that table. You will get the same error!

If you realize what is going on and cheat by forcing buffering to either none or row mode in the offending data session, create the index and set it and then re-set the buffering you will find that you cannot then close the index file without getting Error #1579.

Don’t even try and do the same thing while you have a transaction in force. If you manage to create the index (by playing around with the buffer modes) Visual FoxPro will not allow you to close the transaction while this index is in use. However, you will then find you cannot close the index while the transaction is open! We had to re-boot Visual FoxPro to get out of this one! The bottom line is, therefore, stay away from stand-alone indexes when using buffered tables.
------------------------------------------------------------------------------
----
Regards
Andy Kramek
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform