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:
00547172
Vues:
17
>>Hi all
>>I have a form with a table in the dataenvironement
>>The table is open exclusive
>>How can i check if the table is open by another user
>>and open the table in read only to let the user look but not edit the table.
>>
>>
>>Thanks
>>
>>Benoit
>
>You can attempt to open the table exclusively (use mytable exclusive) and trap for the error 'File in use by another' if someone else the table open. If youi get the error, you can then use the NOUPDATE keyword in the use command.
>local llerror, lcerror
>lcerror = on('error')
>llerror = .F.
>on error llerror = .T.
>use mytable exclusive
>on error &lcerror
>if llerror then
>   * couldn't open table exclusively
>   use mytable shared noupdate
>endif
>
>HTH.


Hi Larry

Is it possible to do it in the dataenvironment ?
I mean in the beforeopentable.

Thanks
Benoit
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform