Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using 2 Databases at Once

Status
Not open for further replies.

Center

Programmer
Oct 19, 2002
52
0
0
US
When I used dbaseII I always used 2 databases at once, easily, and it always worked. Haven't figured out how in dbase IV. For test made a database called oldfile with fields key and city, indexed it on key to old.ndx. Made a database called newfile with fields key and company, indexed it on key to new.ndx. Put peoples' names in key, same people in both, different order.
If I copy this file right out of my dbase IV manual it doesn't work. How should I rewrite the next to last line or any other errors.
SELECT 1
USE OLDFILE INDEX OLD ALIAS PRIMARY
SELECT 2
USE NEWFILE INDEX NEW ALIAS SECONDARY
SELECT PRIMARY
SET RELATION TO KEY INTO SECONDARY
DISP NEXT 5 KEY->KEY,CITY,COMPANY
*(ALSO HAVE TRIED WITH A FILENAME JUST AFTER THE 5)
 
The correct last line should be:
DISPLAY NEXT 5 PRIMARY->Key, PRIMARY->City, SECONDARY->Company
Because KEY-> is not a valid ALIAS-Name and Company is not in SELECT 1

Greetings AlfredD
 
Thanks a million AlfredD. I had tried typing the line hundreds of ways but never got it right. Keep up the good work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top