Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any way to Test for Exclusivity
Message
De
08/02/2004 12:23:13
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00875208
Message ID:
00875267
Vues:
15

I can see that this works fine but will I have a problem with the select settings:

I normally would have the Alias set up in DE along with order, filters etc.
If I do a USE MYALIAS , will I not lose these settings ?

e.g. In MY DE or elsewhere I have settings such as:
Sele 0
Use Myalias
Set Order to MyOrder
Set Filter to Myfilter etc


When I now want to pack the file, and I Use Myalias, will I not get a File In use and afterwards I will have lost my Order and Filter settings.

(I read somewhere ..cant remember where about doing this sort of thing in a separate data session so that it would not interfere with other settings such as Filters and Orders... maybe this would be the way to go)

Thanks for your help.


I not understood well.

Hovewer:
a) if the table is open in another datasession 
then you cannot open with exclusive access.

b) if the table is open in this datasession with no exclusive access, 
then you cannot open again with exclusive access.

SET EXCLUSIVE OFF
USE MyTable IN 0
* NEXT exclusive is ignored : A BUG for me, correct is fire a ERROR
USE MyTable IN 0 AGAIN EXCLUSIVE

c) if the table is open in this datasession with exclusive access, 
then you can open again with exclusive access,
but you cannot do a pack command.

d) if you open the table with exclusive access, 
and do a PACK, VFP copy the dbf,memo file and structured cdx;
for do this operation, VFP release the file handles 
and after reopen the packet table; 
this lose the workarea configuration.
Then, for a correct packing you must
do the PACK when you open the table first time on the multiuser enviroment,
and after use it without exclusive use
** IF I CAN DO A PACKING
USE Mytable EXCLUSIVE
PACK
USE  && unfortunately, on VFP EXCLUSIVE is a readonly property
** END PACKING
** now use the table and set recno(),order(),filter(),key,fields ....
This have a implicit result:
on VFP is hard to implement a 24/7 uninterrupted multiuser process
with a onetier application


Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform