Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
5.0 problem with order tables are opened in
Message
 
À
02/06/1998 18:31:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00104224
Message ID:
00104267
Vues:
19
>I have a form that has a data environment that has all the tables in my DBC. I have auto open tables turned on, which it does quite nicely. I'm using the Microsoft's textbutton class and when I go to hit "Save" on the Add/Save button, I get trigger failures on the "child" tables because it ran their update before it ran the "parent" table update. The problem seems to lie in the textbutton updaterows method. In this method, it grabs the table names in the order that they are opened and then does a do loop in that order to run tableupdate(). Has anyone noticed this before? Is there a way to dictate the order that the tables are opened in without hard coding it? Thanks!
>
>Laurisa Watkins
>Seattle Parks Dept.

Laurisa, the Save button works through your DataEnvironment in the same order as each cursor was added to the DE. If you open your DE and click on each table, you will see 'Cursor1', 'Cursor2', etc. This is the order of the save. You can remove all the cursors from the DE and add them back in turn, or you can make a method (or even an application object method or a class you drop on a form) which orders the tables correctly.

You could design a method that includes ALL your tables, skipping tables not in use with
if used('ThisTable')
   nRet=tableupdate(1, 'ThisTable')
endif
and attach this code to each form.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform