Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dataenvironment
Message
De
30/12/2003 17:46:54
 
 
À
30/12/2003 17:18:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00862976
Message ID:
00863013
Vues:
18
>Hi Fred,
>
>Thanks for so far.
>I've tried earlier to do so, but then i always get the error that the property is not know.
>I've the following situation:
>I created on the formset the property .FileOpen
>In the error event of the dataenvironment i check for error's that occurs.
>Ie. by error 1995 i give a message and set thisformset.FileOpen to .F.
>In the load event of the formset i put the following line:
> Return this.FileOpen
>But it won't work because i get an error when i tried to set FileOpen to .F. in the
>error event of the dataenvironment.
>
>Jan

OK, what you need to do is this:

1) In the BeforeOpentables of the DataEnvironment, add a property "FileOpen".
2) In the error method, set that property to .F.
3) in the Init of the form:
RETURN thisformset.DataEnvironment.FileOpen

It may still work in the Load, too. (just checked, it does work here, too)

Essentially, you're moving your error property to the DataEnvironment, not the FormSet at all. FormSets seem to have a very strange instanciation order with the DataEnvironmment, no wonder I've never used them.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform