Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table exclusive in dataenvironment
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00546926
Message ID:
00547236
Vues:
8
Hi Benoit,

Why don't you try to use low level functions before opening your table? I suggest you to configure your DE with a non-exclusive open mode at design time and programmaticaly set it to exclusive.

Simply try this code in the BeforeOpenTable method of your DataEnvironment

LOCAL lHandle
*!* Try top open your file Read/Write
lHandle = fopen(dataEnvironment.Cursor1.Cursorsource,2)

*!* If your handle is set to -1, your are unable to open it, so it's already
*!* opened elsewhere
if lHandle = -1 then
Dataenvironment.Cursor1.Exclusive = .F.

else
Dataenvironment.Cursor1.Exclusive = .T.
*!*Don't forget to low-level close DBF
fclose (lHandle)endif
Endif

I think this should be usefull for your application

Best regards
Thierry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform