Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check my logic please
Message
 
 
To
21/02/2002 13:11:57
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00623281
Message ID:
00623669
Views:
8
>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--
Previous
Reply
Map
View

Click here to load this message in the networking platform