 |
|
|
|
|
|
|
 |
08-15-2008, 02:26 PM
|
#1
|
|
Guest
|
Multi-Table Link PROBLEMS
Friends,
I am trying something really simple and can't get it to work. I'm
missing something very basic it seems. I am a power user and have been
using paradox for years.
Trying to link (for airport shuttles):
(Parent Table)
Shuttles.db with "Shuttle Code" as Key.
Includes "Last Name" and "First Name" fields for the driver.
with
(Detail Table)
Drivers.db with "Last Name then First Name as Key.
I want to link these on "Last Name" & "First Name" so there is a
one-to-one relationship.
I also want to have two table frames on my form, one for each table.
If I only link on "Last Name", all is fine. If I link with both "Last
Name" and "First Name" I cannot define fields in Shuttles' table frame.
I actually got this to work but changed something along the way in one
of the two tables (i.e. restructuring). When I open that form I get a
message that it can't open Drivers since an index is missing. I open
anyway and get all to work (i.e. two table frames that behave properly).
But if in trying to deal with the index problem, I go into design,
unlink drivers and relink it, or remove and reinstall the table and
relink it, fields become undefined.
Help!
Pete
|
|
|
|
08-15-2008, 03:36 PM
|
#2
|
|
Guest
|
Re: Multi-Table Link PROBLEMS
Let me summarize what I wrote below:
I want two tableframes (i.e. multiple rows format) on my form.
I can't get two when I link as I want to. One of them is undefinable.
I CAN have a tableframe for the master and independent fields for the
detail table, but not two tableframes as I desire.
Thanks,
Pete
From: Pete Gerhard on 8/15/2008 10:26 AM:
>
> Friends,
>
> I am trying something really simple and can't get it to work. I'm
> missing something very basic it seems. I am a power user and have been
> using paradox for years.
>
> Trying to link (for airport shuttles):
> (Parent Table)
> Shuttles.db with "Shuttle Code" as Key.
> Includes "Last Name" and "First Name" fields for the driver.
>
> with
> (Detail Table)
> Drivers.db with "Last Name then First Name as Key.
>
> I want to link these on "Last Name" & "First Name" so there is a
> one-to-one relationship.
>
> I also want to have two table frames on my form, one for each table.
>
> If I only link on "Last Name", all is fine. If I link with both "Last
> Name" and "First Name" I cannot define fields in Shuttles' table frame.
>
> I actually got this to work but changed something along the way in one
> of the two tables (i.e. restructuring). When I open that form I get a
> message that it can't open Drivers since an index is missing. I open
> anyway and get all to work (i.e. two table frames that behave properly).
> But if in trying to deal with the index problem, I go into design,
> unlink drivers and relink it, or remove and reinstall the table and
> relink it, fields become undefined.
>
> Help!
>
> Pete
>
|
|
|
|
08-15-2008, 04:29 PM
|
#3
|
|
Guest
|
Re: Multi-Table Link PROBLEMS
Okay,
I add a field to Drivers = "DriverID" and and Index "DriverID" on
"DriverID" and add field "DriverID" to Shuttle.db.
Now if I join on "DriverID" all works perfectly. This is the index that
had been broken because I eliminated the fields DriverID and used "Last
Name" + "First Name" as the key in Drivers.db.
When I join this way I get a one-to-many from Shuttles to Drivers.
When I join the other way on last and first names, I get a one-to-one.
And apparently a one-to-one won't allow me to have a table frame
(multiple-row) for each table, only the master/parent.
But I want two tableframes because I like the "table-look" of the
tableframe over just a bunch of fields. The Headings are nice and neat.
If I have to create that look by just adding stray fields together, I
don't even think I can get there. Way too much work anyway.
Any help?
Pete
From: Pete Gerhard on 8/15/2008 11:36 AM:
>
> Let me summarize what I wrote below:
> I want two tableframes (i.e. multiple rows format) on my form.
> I can't get two when I link as I want to. One of them is undefinable.
> I CAN have a tableframe for the master and independent fields for the
> detail table, but not two tableframes as I desire.
>
> Thanks,
> Pete
>
> From: Pete Gerhard on 8/15/2008 10:26 AM:
>>
>> Friends,
>>
>> I am trying something really simple and can't get it to work. I'm
>> missing something very basic it seems. I am a power user and have been
>> using paradox for years.
>>
>> Trying to link (for airport shuttles):
>> (Parent Table)
>> Shuttles.db with "Shuttle Code" as Key.
>> Includes "Last Name" and "First Name" fields for the driver.
>>
>> with
>> (Detail Table)
>> Drivers.db with "Last Name then First Name as Key.
>>
>> I want to link these on "Last Name" & "First Name" so there is a
>> one-to-one relationship.
>>
>> I also want to have two table frames on my form, one for each table.
>>
>> If I only link on "Last Name", all is fine. If I link with both "Last
>> Name" and "First Name" I cannot define fields in Shuttles' table frame.
>>
>> I actually got this to work but changed something along the way in one
>> of the two tables (i.e. restructuring). When I open that form I get a
>> message that it can't open Drivers since an index is missing. I open
>> anyway and get all to work (i.e. two table frames that behave
>> properly). But if in trying to deal with the index problem, I go into
>> design, unlink drivers and relink it, or remove and reinstall the
>> table and relink it, fields become undefined.
>>
>> Help!
>>
>> Pete
>>
>
|
|
|
|
08-15-2008, 05:34 PM
|
#4
|
|
Guest
|
Re: Multi-Table Link PROBLEMS
Pete
When you link two tables in such a way that they are 1-1 linked (or M-1)
you'll only get one table frame.
If you want two table frames, don't link the tables in the datamodel.
Instead use code to set a range so only linked records are shown.
--
Bertil Isberg - CTECH
Paradox buglist:
online: http://hem.bredband.net/bertilisberg/
"Pete Gerhard" <petegerhard@verizon.net> skrev i meddelandet
news:48a5d883$1_3@cnews...
>
> Okay,
>
> I add a field to Drivers = "DriverID" and and Index "DriverID" on
> "DriverID" and add field "DriverID" to Shuttle.db.
>
> Now if I join on "DriverID" all works perfectly. This is the index that
> had been broken because I eliminated the fields DriverID and used "Last
> Name" + "First Name" as the key in Drivers.db.
>
> When I join this way I get a one-to-many from Shuttles to Drivers.
> When I join the other way on last and first names, I get a one-to-one.
> And apparently a one-to-one won't allow me to have a table frame
> (multiple-row) for each table, only the master/parent.
>
> But I want two tableframes because I like the "table-look" of the
> tableframe over just a bunch of fields. The Headings are nice and neat.
> If I have to create that look by just adding stray fields together, I
> don't even think I can get there. Way too much work anyway.
>
> Any help?
>
> Pete
>
> From: Pete Gerhard on 8/15/2008 11:36 AM:
>>
>> Let me summarize what I wrote below:
>> I want two tableframes (i.e. multiple rows format) on my form.
>> I can't get two when I link as I want to. One of them is undefinable.
>> I CAN have a tableframe for the master and independent fields for the
>> detail table, but not two tableframes as I desire.
>>
>> Thanks,
>> Pete
>>
>> From: Pete Gerhard on 8/15/2008 10:26 AM:
>>>
>>> Friends,
>>>
>>> I am trying something really simple and can't get it to work. I'm
>>> missing something very basic it seems. I am a power user and have been
>>> using paradox for years.
>>>
>>> Trying to link (for airport shuttles):
>>> (Parent Table)
>>> Shuttles.db with "Shuttle Code" as Key.
>>> Includes "Last Name" and "First Name" fields for the driver.
>>>
>>> with
>>> (Detail Table)
>>> Drivers.db with "Last Name then First Name as Key.
>>>
>>> I want to link these on "Last Name" & "First Name" so there is a
>>> one-to-one relationship.
>>>
>>> I also want to have two table frames on my form, one for each table.
>>>
>>> If I only link on "Last Name", all is fine. If I link with both "Last
>>> Name" and "First Name" I cannot define fields in Shuttles' table frame.
>>>
>>> I actually got this to work but changed something along the way in one
>>> of the two tables (i.e. restructuring). When I open that form I get a
>>> message that it can't open Drivers since an index is missing. I open
>>> anyway and get all to work (i.e. two table frames that behave properly).
>>> But if in trying to deal with the index problem, I go into design,
>>> unlink drivers and relink it, or remove and reinstall the table and
>>> relink it, fields become undefined.
>>>
>>> Help!
>>>
>>> Pete
>>>
>>
>
|
|
|
|
08-15-2008, 07:07 PM
|
#5
|
|
Guest
|
Re: Multi-Table Link PROBLEMS
Bertil,
Thanks! Great idea to use code to accomplish essentially what a link
would do!
Pete
From: Bertil Isberg on 8/15/2008 1:34 PM:
> Pete
>
> When you link two tables in such a way that they are 1-1 linked (or M-1)
> you'll only get one table frame.
>
> If you want two table frames, don't link the tables in the datamodel.
> Instead use code to set a range so only linked records are shown.
>
>
|
|
|
|
08-16-2008, 01:04 PM
|
#6
|
|
Guest
|
Re: Multi-Table Link PROBLEMS
If one shuttle can have more than one driver, why do you store driver
information in the shuttle record? That would mean that a shuttle can only
have one driver, the one in the record, and driver.db just stores
additional info about that driver.
And if there is only one driver per shuttle, why would you want to display
a tableframe of drivers who *aren't* assigned to the shuttle?
HOWEVER, if shuttle:drivers is 1:M, then shuttle.db should contain no
driver info at all. Drivers.db would be indexed on shuttleID AND driverID
-- and this should allow you to display two table frames.
THIRD POSSIBILITY: If shuttles:drivers is M:M you need a linking table with
two fields: shuttleID and driverID. Call it (say) link.db. Now you can show
all the drivers assigned to a shuttle by linking
shuttle.db:link.db:driver.db
and you can show all the shuttles assigned to a driver by linking
driver.db:link.db:shuttle.db.
--
Jim Hargan
On Fri, 15 Aug 2008 12:29:53 -0700, Pete Gerhard wrote:
> Okay,
>
> I add a field to Drivers = "DriverID" and and Index "DriverID" on
> "DriverID" and add field "DriverID" to Shuttle.db.
>
> Now if I join on "DriverID" all works perfectly. This is the index that
> had been broken because I eliminated the fields DriverID and used "Last
> Name" + "First Name" as the key in Drivers.db.
>
> When I join this way I get a one-to-many from Shuttles to Drivers.
> When I join the other way on last and first names, I get a one-to-one.
> And apparently a one-to-one won't allow me to have a table frame
> (multiple-row) for each table, only the master/parent.
>
> But I want two tableframes because I like the "table-look" of the
> tableframe over just a bunch of fields. The Headings are nice and neat.
> If I have to create that look by just adding stray fields together, I
> don't even think I can get there. Way too much work anyway.
>
> Any help?
>
> Pete
>
> From: Pete Gerhard on 8/15/2008 11:36 AM:
>>
>> Let me summarize what I wrote below:
>> I want two tableframes (i.e. multiple rows format) on my form.
>> I can't get two when I link as I want to. One of them is undefinable.
>> I CAN have a tableframe for the master and independent fields for the
>> detail table, but not two tableframes as I desire.
>>
>> Thanks,
>> Pete
>>
>> From: Pete Gerhard on 8/15/2008 10:26 AM:
>>>
>>> Friends,
>>>
>>> I am trying something really simple and can't get it to work. I'm
>>> missing something very basic it seems. I am a power user and have been
>>> using paradox for years.
>>>
>>> Trying to link (for airport shuttles):
>>> (Parent Table)
>>> Shuttles.db with "Shuttle Code" as Key.
>>> Includes "Last Name" and "First Name" fields for the driver.
>>>
>>> with
>>> (Detail Table)
>>> Drivers.db with "Last Name then First Name as Key.
>>>
>>> I want to link these on "Last Name" & "First Name" so there is a
>>> one-to-one relationship.
>>>
>>> I also want to have two table frames on my form, one for each table.
>>>
>>> If I only link on "Last Name", all is fine. If I link with both "Last
>>> Name" and "First Name" I cannot define fields in Shuttles' table frame.
>>>
>>> I actually got this to work but changed something along the way in one
>>> of the two tables (i.e. restructuring). When I open that form I get a
>>> message that it can't open Drivers since an index is missing. I open
>>> anyway and get all to work (i.e. two table frames that behave
>>> properly). But if in trying to deal with the index problem, I go into
>>> design, unlink drivers and relink it, or remove and reinstall the
>>> table and relink it, fields become undefined.
>>>
>>> Help!
>>>
>>> Pete
>>>
>>
|
|
|
|
08-18-2008, 08:28 AM
|
#7
|
|
Guest
|
Re: Multi-Table Link PROBLEMS
I think you need to rethink the normalization. Bertil explained the link
issue. Jim got you started on what you need to rethink in the structure.
Check out my paper on Normalization on our paradox resources page (link
in my signature) for more on structure of tables when normalizing,
setting up keys and foreign keys etc.
Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and
non-profits since 1982
Pete Gerhard wrote:
>
> Friends,
>
> I am trying something really simple and can't get it to work. I'm
> missing something very basic it seems. I am a power user and have been
> using paradox for years.
>
> Trying to link (for airport shuttles):
> (Parent Table)
> Shuttles.db with "Shuttle Code" as Key.
> Includes "Last Name" and "First Name" fields for the driver.
>
> with
> (Detail Table)
> Drivers.db with "Last Name then First Name as Key.
>
> I want to link these on "Last Name" & "First Name" so there is a
> one-to-one relationship.
>
> I also want to have two table frames on my form, one for each table.
>
> If I only link on "Last Name", all is fine. If I link with both "Last
> Name" and "First Name" I cannot define fields in Shuttles' table frame.
>
> I actually got this to work but changed something along the way in one
> of the two tables (i.e. restructuring). When I open that form I get a
> message that it can't open Drivers since an index is missing. I open
> anyway and get all to work (i.e. two table frames that behave properly).
> But if in trying to deal with the index problem, I go into design,
> unlink drivers and relink it, or remove and reinstall the table and
> relink it, fields become undefined.
>
> Help!
>
> Pete
>
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Adobe Newsgroups | Software Newsgroups
Powered by: vBulletin Version 3.0.7 Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
© 2003-2004 All Rights Reserved GroupBrowser LLC.
|
 |