Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check my logic please
Message
 
 
À
21/02/2002 13:11:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00623281
Message ID:
00623669
Vues:
9
>I'm using VFP 5.0a
>
>My views all have the field validation rules copied from the underlying tables.
>
>I'm trying to find a way to prevent the validation rule from executing twice, 1st when the view is edited and 2nd when TABLEUPDATE() is issued.
>
>Can you think of anything wrong with this logic?
>
>This is just the logic, not the coding, so ignore syntax.
>
>FORM
>    property aViews(1)
>
>    INIT()
>        for each cursor in dataenvironment
>            if cursor is a view
>                ** store object reference for each view
>                add row(n) to this.aViews
>                this.aViews(n) = CreateObject('View_Validation',alias())
>            endif
>        endfor
>
>    DESTROY()
>        ** release all object references
>        this.aViews = .null
>
>ENDFORM
>
>
< snip >

It's better to release object refrences stored into array individually.
*DESTROY()
  ** release all object references
  For i=1 TO ALEN(this.aViews)  
    this.aViews[i] = .null
  Endfor
< snip >
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform