Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TableUpdate problem
Message
De
24/03/2000 15:16:27
David Gibson
Beacons Software
Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
TableUpdate problem
Divers
Thread ID:
00350177
Message ID:
00350177
Vues:
51
Here's the problem - take a table, lets call it entry.dbf, and open it twice, once under its own name and once with an alias - say entrylookup.dbf. Now take a local view that is based on this table called v_entry and open it too. (Mines a parameterized view that only returns one record of the table at any time, but thats not really relevant.)

Go into the view and add a new record or edit an existing record and then issue TABLEUPDATE, the changes are written back without any problems - but which instance of the table did it write back to?

I was expecting record pointer in entry.dbf to be set to the record I had just TABLEUPDATEd in the view and I could not understand why it wasn't moving. Then I discovered that the record pointer in entrylookup was being moved instead.

Whats more its not just a case of moving the record pointer, if you buffer the two tables as well I found the changes were written to entrylookup and not to entry as I expected.

Further experiments indicate that whichever instance of the table is opened last (regardless of whether or not it was the aliased one) was the one the changes were written to.

Needless to say what I want here is to find a way of TABLEUPDATing the view so it writes to entry.dbf and not to my lookup copy that I also happen to have opened at the time.

Has anyone encountered this problem before and/or got a suggested solution?

Many thanks

David
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform