Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot access selected table (1152) - a timing thing?
Message
De
27/06/2002 11:30:54
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Cannot access selected table (1152) - a timing thing?
Divers
Thread ID:
00672905
Message ID:
00672905
Vues:
58
I've read all I could find about this error, and trying to trap it I've used up all the tricks I found. But this one was weird. I've solved it (knock on wood) and I'm posting this just to try to understand what happened.

I have a huge form where everything happens. It has four datasessions in it, bunch of containers within containers, it's desktop, topwindow, no menu, _screen invisible. None of the tables involved in this problem are open in more than one datasession.

There's a modal form which runs the annual reset of the data, preparing for a new season, which involves a lot of deletions and packing of the tables. The modal form uses the default datasession (#5 in this case). In order to be able to do mass-deletions and packing, it has to open some tables exclusively. What I did was go through all the bizobjects and call their closetable method, then close all the remaining tables. The rest is not important (open tables exclusive, do the works, close tables, quit the app so the main form doesn't complain about its tables being closed). It all works in development, and also works from an exe. So I built the setup, installed on the other box and bang - it started giving me 1152 while closing the tables. Click OK and everything proceeds fine.

I thought it may be some combo or listbox on the main form, at least the visible ones, so I removed their rowsources and recordsources for the grids - still happens the same.

I've added some notification - used the label above the thermometer to say what is the form exactly doing, so I'd know what was it closing at the moment. The weird thing was that the thing happened at different times; sometimes it happened very early, sometimes later, and more than half of the time it didn't happen at all. Never happened while debugging, which made me think it was a timing issue.

The solution was a simple
wait "" time 0.5
in the form.updatethermo code. The point is that the second box where I was trying this was just too fast - it's 1GHz vs 400MHz on the first box. Since I was closing many views and underlying tables, it probably reported on them as being still used when they were already closed (or vice versa - no way to know). So the process lasts about six seconds longer now, but who cares about six seconds a year :)

What I'd like to know is whether this explanation holds water, or is there something that may this solution less than a real solution?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform