Access :Entity Relationship problem |
尚未結案
|
Vashee
初階會員 ![]() ![]() 發表:38 回覆:87 積分:25 註冊:2003-03-31 發送簡訊給我 |
First i will show the table i have made: Student Detail:
Candidate Number (Primary Key)
Center Number
Candidate Name
Center Name Exam Results
Subject Name
Subject Reference Code (Primary Key)
Candidate Number (Primary Key)
Original Mark
Remark Mark
Grades
Script Return I have set up a Master Detail relatetionship between them and it is successful. but link Studen Detail(Candidate No.) to Exam Results(Candidate No.) as a One To Many Relationships. However, as extra constraint is added afterwards:
Candidate number will be unique with one centre, but not between centres. That means there could be 2 identifical Candidate number with 2 centres To overcome this problem i did some changes: Student Detail:
Candidate Number (Primary Key)
Center Number (Primary Key)
Candidate Name
Center Name This will overcome the problem, by making combination pri. keys
but the master detail relationship won't work any more. How can i overcome this problem maintaining the masterdetail relationship?# Thanks
|
Vashee
初階會員 ![]() ![]() 發表:38 回覆:87 積分:25 註冊:2003-03-31 發送簡訊給我 |
Nevermind lol, I just solved the problem myself by doing this:
Student Detail
Candidate Number (Primary Key)
Center Number (Primary Key)
Candidate Name
Center Name Exam Results
Subject Name
Subject Reference Code (Primary Key)
Candidate Number (Primary Key)
Center Number (Primary Key)
Original Mark
Remark Mark
Grades
Script Return I made a triple combination. hehe :)
|
Vashee
初階會員 ![]() ![]() 發表:38 回覆:87 積分:25 註冊:2003-03-31 發送簡訊給我 |
Oh sorry, the problem still haven't solved. when I try to set up a master-detail relationship in Field Link Designer by adding
Candidate Number > Candidate Number
Center Number > Center Number it shows up the following message:
arguements are of the wrong type, are out of acceptable range or are in conflict with one another. Any idea of the problem?
|
timhuang
尊榮會員 ![]() ![]() ![]() ![]() ![]() ![]() 發表:78 回覆:1815 積分:1608 註冊:2002-07-15 發送簡訊給我 |
|
Vashee
初階會員 ![]() ![]() 發表:38 回覆:87 積分:25 註冊:2003-03-31 發送簡訊給我 |
|
timhuang
尊榮會員 ![]() ![]() ![]() ![]() ![]() ![]() 發表:78 回覆:1815 積分:1608 註冊:2002-07-15 發送簡訊給我 |
|
Vashee
初階會員 ![]() ![]() 發表:38 回覆:87 積分:25 註冊:2003-03-31 發送簡訊給我 |
what did u do in TLink Designer?
just adding:
Center Number > Center Number
Candidate Number > Candidate Number
? Also, if there is another Master table linking to that detail table, will it cause any probelms? The third table is:
Subject Name
Subject Reference Code (Primary Key) it is also linked to the Results Table as well
|
timhuang
尊榮會員 ![]() ![]() ![]() ![]() ![]() ![]() 發表:78 回覆:1815 積分:1608 註冊:2002-07-15 發送簡訊給我 |
Yes, just add 2 relative mapping column pairs. I don't know what you mean 'there is another Master table linking to that detail table', because the master detail is one-to-one table relation. One-to-two master/detail relation is accept. But two master to one detail relation is not allowed in one form. The detail table 'master field' and 'master datasource' are set to one master table not for two master table.
If you want to design one-one-one three cascade master/detail are also can be accept. Just set the second table 'master datasource' to the first table and set the third table 'master datasource' to the second table.
1. OK one-two master/detail MASTER - Detail \ Detail ... 2. OK one-one-one master/detail MASTER - Detail(for first) / Master(for third) - Detail ... 3. WRONG two-one master/detail MASTER - Detail MASTER / |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |