Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table not getting updated?
Message
De
25/03/2000 20:54:54
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Table not getting updated?
Divers
Thread ID:
00350459
Message ID:
00350459
Vues:
58
I have an agencies.dbf that is updated in a form, MaintainAgencies, via a view, ModifyAgency. The Data Environment of the form includes the view and 2 other tables (not the agencies.dbf table). MaintainAgencies is Modal, uses a Private Data Session and can only be called from the inital form, Main.

Entries in agencies.dbf are used in another form, Reservation, that also has a Private Data Session, is Modal, and can only be called from the initial form, Main. Values from the agencies.dbf table are used in a cursor, and the cursor is the RowSource for a Dropdown list.

The problem is that when a new agency is added via the MaintainAgencies form, after the user exits the form and calls the Reservation form, the new Agency is not available in the Dropdown list. I use the following to set the rowsource of the Dropdown list:
** make cAgencies for combo
 SELECT Agency, Code, AdultPrice, ChildPrice, AdultXFRPrice, ChildXFRPrice, lActive ;
  FROM Agencies INTO CURSOR cAgencies ;
  WHERE IIF( Thisform.lAdding, lActive, .T. ) ORDER BY AGENCY
 Thiform.AgencyCombo.RowSource = "cAgencies"
If the user exits the program and runs it again, the agency IS then avilable in the Dropdown list.

I thought maybe the Agencies.DBF table wasn't getting closed automatically in the MaintainAgencies form, so I added code to close it, if it's open in the Unload method. That didn't help.

Any input is appreciated. J
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform