Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open Table Multiple Times
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01056531
Message ID:
01056537
Views:
38
>I want to open the same table multiple times in different work areas. I am aware of the AGAIN clause but doing it that way does not seem INDEPENDENT. If I go to a record in one area the other instance of the table is also pointing to the same record. I want the two instances of the table to be totally independant.
>
>Failing the above, what is the best way to access a subset of records in a table that is already open without changing the table or its pointers/indexes or current record?

Hi Lou,

Your observation is incorrect. The aliases opened with AGAIN clause are independent as much as they can be and record pointer movement in one work area doesn't affect another. Here's a simple test you can run to see for yourself
OPEN DATABASE (HOME(2) + "Northwind\northwind.dbc")
USE northwind!Customers AGAIN ALIAS Cust1 IN 0
USE northwind!Customers AGAIN ALIAS Cust2 IN 0
GOTO 5 IN cust1
? RECNO("cust1"), RECNO("cust2")	&& 5    1
GOTO 10 IN cust2
? RECNO("cust1"), RECNO("cust2")	&& 5   10
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform