Object Pointer Info
Ruslan Zasukhin
sunshine at public.kherson.ua
Fri Mar 7 20:33:20 CST 2003
on 3/7/03 8:13 PM, Steve Kump at lists at jskump.com wrote:
> Hi List,
>
> I am a new Valentina user, still trying the product out. So far, it seems
> great. I'm using AppleScript and FaceSpan.
>
> A few questions - I'm trying to create a relationship between two tables:
>
> Dealers and Listings.
>
> Each Dealer can have several Listings. I use the DealerID field as the
> ObjectPtr. My question is this:
>
> Do I have to create Object Pointers in BOTH tables?
No, only in MANY table, I.e. Listings in your case
> So, the Dealer ID field in the Dealer table points to the Dealer ID field in
> the Listings table AND the DealerID field in the Listings table points to the
> DealerID field in the Dealer table?
Steve, please read ValentinaSQL.pdf
One of last paragraphs that describe RDB linking and ObjectPtr linking and
how they differ.
If you use ObjectPtr field in MANY table, then ONE table even do not need ID
field.
> I think I only have to create the pointer in the Listings table and point it
> to the Dealer table. This creates the 1 to many relationship I am looking
> for.
YES! correct.
> When I create the pointer in the Dealer table and point to the Listings
> table, it creates a 1 to 1 relationship.
You do not need this second ObjectPtr field!
IF you have some RecID of record in dealer table, and you want find related
to it records in table Listings, you need simply
select * from Listings where Ptr = SomeRecID
> Further, no matter how I create the relationship, when I choose "Show
> Linked" from the user interface and specify the Object B as [DealerID]Dealer
> or [DealerID]:Listings from the pull down, it doesn't show the related
> records. I clicked the Dealer ID column sort and then it showed 1 dealer,
> but never the Dealer that should be related to the listing record based on
> the Dealer ID.
This means that records are not correctly linked by ObjectPtr field.
What and how is stored in values of your ObjectPtr field?
Here must be stored RecIDs of pointed records.
> To make a long story short, what is the correct way to create the pointer in
> such a situation?
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list