Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 1709
Message
De
05/02/1999 13:17:20
 
 
À
05/02/1999 10:43:35
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00183899
Message ID:
00184440
Vues:
27
>The problem is that opening the view places a lock on a record in the database container. If two users try to open the same view at the same time, one of them will always be denied.
>

I understand this. What I don't understand is why this is happening in one app and not all the others I have built. The problem app has about 12 users in it at any given time, 4 or 5 of them doing rapid data entry. During the worst times, I can get 1709 10 times in 10 minutes. Something is wrong. I have an app on another site that is a 50 user app ,and at certain times of the year, have 15-25 people doing hard, fast data entry and jumping quickly from form to form. Both apps use views almost exclusively.



>There are two solutions to this problem. One is something like the following:
>
>cOldError=ON("ERROR")
>ON ERROR DO SkipError
>FOR nCounter=1 TO 20
>USE (View)
>IF USED(View)
>EXIT
>ELSE
>WAIT WINDOW "Accessing database..." TIMEOUT 1
>ENDIF
>ENDFOR
>ON ERROR &cOldError
>IF !USED(View)
>*Generate error
>ENDIF

This would be fine if views were getting opened in code, but this error is getting thrown from the Dataenvironment.Opentables event. I do not have a subclassed dataenvironment, so as of yet, there is no way for me to universally implement the above. BTW though- most of the above code would be unnecessary if the ON ERROR routine would just issue a RETRY when the error code is 1709... this makes the loop automatic, and hides this little anamoly from the code.


>The second solution, that works perfectly (but you won't like it), is to move the views to a separate DBC and distribute the new DBC with the app to each workstation (this is what I do). When you create a view, have the target database open as well. Then, when asked which tables to add to the view, switch databases in the combo box that appears with a list of databases.

Not possible. I could never practically implement something like this because of the dynamic nature of the apps while they are being developed. Worrying about DBC version as well as exe versions is not an issue I want to cope with.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform