Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TableUpdate problem
Message
From
24/03/2000 15:16:27
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
TableUpdate problem
Miscellaneous
Thread ID:
00350177
Message ID:
00350177
Views:
50
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
Next
Reply
Map
View

Click here to load this message in the networking platform