Path: utzoo!attcan!uunet!tank!ncar!asuvax!cs.utexas.edu!tut.cis.ohio-state.edu!cica!mr From: mr@cica.cica.indiana.edu (Michael Regoli) Newsgroups: comp.databases Subject: dBaseIV: SET RELATION Help Needed (semi-long) Keywords: dbase, set relation, neophyte question Message-ID: <632@cica.cica.indiana.edu> Date: 15 Mar 90 15:58:21 GMT Distribution: comp Organization: Center for Innov. Comp. Appl., Bloomington, IN Lines: 86 ][ I'm having a little trouble understanding the format of the "SET RELATION TO" command in dBaseIV. I have two databases that I would like to link together. One is a database of names and addresses (R.DBF), and the other is a database of the same individuals with publications they have written (RPUB.DBF). The databases share two fields in common: RID (I.D. number) and LAST. Structure for database: C:\DB\JAH\REVIEW\R.DBF Number of data records: 15 Date of last update : 03/12/90 Field Field Name Type Width Dec Index 1 RID Numeric 5 N 2 FIRST Character 25 N 3 LAST Character 25 N . . 22 KEY10 Character 20 N ** Total ** 437 Structure for database: C:\DB\JAH\REVIEW\RPUBS.DBF Number of data records: 15 Date of last update : 03/12/90 Field Field Name Type Width Dec Index 1 RID Numeric 5 N 2 LAST Character 25 Y 3 B1 Character 250 N 4 P1 Character 30 N 5 D1 Character 4 N . . 32 JD5 Character 4 N ** Total ** 2871 As you can see, the last database is rather large. That is the main reason why I've kept it separate. What I would like to do is open the two databases so that information can be entered into both via an input screen. Can someone provide a little insight into how to link these two? Of particular help would be to describe more clearly the meaning of the syntax of the SET RELATION TO command (e.g., SET RELATION TO INTO [, INTO ]...) So far, I'm thinking of: ** ** relate.prg: set up a relation ** select 1 use r index on rid to r_rid use r index r_rid order r_rid select 2 use rpubs ** ** does rpubs need indexing on rid here? ** set relation to rid into r ** ** now perform whatever, e.g. ** display all r->rid, rpubs->last, rpubs->b1 ** Basically, all I'm concerned with (at the moment :-)), is opening the two databases so information can be placed into them (especially making certain that an individual's publications are kept with his identification number (RID), name and address). I welcome any e-mail on this. Thanks for any pointers! -- michael regoli mr@cica.indiana.edu regoli@iubacs.bitnet ...rutgers!iuvax!cica!mr