Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table not getting updated?
Message
From
25/03/2000 20:54:54
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Table not getting updated?
Miscellaneous
Thread ID:
00350459
Message ID:
00350459
Views:
56
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
Next
Reply
Map
View

Click here to load this message in the networking platform