Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data environment problem
Message
De
23/05/2002 18:53:19
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/05/2002 14:36:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00660672
Message ID:
00660820
Vues:
11
>Hey all,
>
>In my form base-class, I have put some code in the 'load' event to set the datapath correctly. I do this by looping through the objects, and for each cursor setting the 'database' property to a variable stored on my application object.
>
>This works excellent on most of the forms, however on some I get the following error:
>
>'Property setting will not take effect until data environment reloaded'
>
>I have looked at all the various aspects of the forms, but can not find anything specific that could cause this error.
>
>Anyone have an idea what may cause this?

If there's any code in de.BeforeOpenTables, that code will run before form.load, and it seems that with .autoopentables the tables get open before form.load, so then it's too late to do anything.

When I had to do something like this, I put the method to do it into the app object, and each DE in each form (yeah, but did it only once) had this line in the BeforeOpenTables:
goApp.SetDeEnv(this)
.
Never had problems after that.

back to same old

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

Click here to load this message in the networking platform