Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Failure to close DBC
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00151449
Message ID:
00151458
Vues:
14
>How can I get around this problem?
>
>I have an application that needs to perform a lookup on a table contained in a DBC other than the DBC that I use for the app. My logic to open/close that table is as follows:
>
>USE table SHARED IN 0 ALIAS mytable
>...
>...
>IF USED("mytable")
> USE IN mytable
>ENDIF
>
>As you can image, at this point I am assuming that this lookup table has been closed. However, it appears that its parent DBC remains open and therefore creates contention for other users or apps.
>
>1. How come USE IN does not close the DBC the way it opened it?
>2. How can I make sure that I close the table and DBC?
>
>Thank you,

Here's a way that would work in your example:
<b>LOCAL lcDBC</b>
USE table SHARED IN 0 ALIAS mytable
<b>SELECT MyTable
lcDBC = CURSORGETPROP("database")</b>
...
...
IF USED("mytable")
   USE IN mytable
ENDIF
<b>set database to &lcDBC
close database</b>
Best
Danijel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform